git log --pretty=email --patch-with-stat --reverse --full-index --binary directory_name > /tmp/directory_name_patch;
git init directory_name;
git am < /tmp/directory_name_patch;
If your Django Apps throws this error:
cursor.execute(self.ops.set_time_zone_sql(), [tz]) django.db.utils.DataError: invalid value for parameter "TimeZone": "America/New_York"
The problem is that your Database and Django app are set to use different timezones.
Search your Django settings files for this:
And then connect to your database and query for the timezone. In Postgres run this query:
The fix is to have your Database and Django app use the same time zone. The quickest fix is to set TIME_ZONE in your Django app to be the same as your Database.
I recently upgraded my OnePlus One to Android 6.0.1 and while I can make phone calls I don’t have any network connectivity unless I’m on WiFi. The symptoms are;
- Can’t send email,
- No access any websites
- Phone is not on a LTE network
This awkward fix, posted byrohitvermamech on the OnePlus Forums get’s LTE and networking working again:
Go into Settings > Mobile Networks > Access Point Names > Restore Defaults
The list should now have many many more choices of APNs. Choose the correct APN. Then go into Settings > Mobile Networks > Network Operators (make sure you are connected to WiFi) click “Choose Automatically”. Then turn Aeroplane Mode on and back off.
VERY IMPORTANT! Restart your phone.
Go into phone and dial *#*#4636#*#* and choose Phone Information. In Phone Information set the Preferred Network Type to LTE/GSM auto (PRL) [even if it says it already, do it again]. Turn off the radio. When the radio is turned off, turn the radio back on. Go down to the SMSC and hit “Refresh” and then “Update”.
The fix for us was to increase Pagespeed’s caches and to give the host (it’s a VM) more RAM.
These are the values that we set:
- Set the target size (in kilobytes) for file cache.
- Set the total size, in KB, of the per-process in-memory LRU cache.
- Set the maximum byte size entry to store in the per-process in-memory LRU cache.
This is what we set them to:
ModPagespeedFileCacheSizeKb 102400 ModPagespeedLRUCacheKbPerProcess 1024 ModPagespeedLRUCacheByteLimit 16384
Use these with care and make sure that your host has enough RAM to fit everything into memory without paging.
Original Image from my Flickr Feed.
Unless your an LDAP expert it’s not obvious how to find the groups a user is member of, and that also describes how you need to tackle this problem.
This code makes a lot of assumptions and also assumes that a user’s UID is named ‘uid’.
If there’s a better way to do this, let me know.
This thread on the Python-LDAP mailing list was quite useful:
- Photo is one I took in 2007 at Fort Point in Boston.
Go visit my friend Sean at Boston 3D Printsmiths:
Two arty things seen today.
The first was this graffiti on a brick wall on Boston Newbury’s Street. I was caught it from the right angle and thought the text and the tree were prefect juxtaposed:
It was in a tree near Boston’s MFA (Museum of Fine Arts).
1. Pics of snow!, 2. Ivy Escapes, 3. Duck at sunrise, 4. Boston Twilight, 5. Main Street, Donegal Town. 1930’s, 6. Donegal Town: The Diamond 1973, 7. Celtic Sprially Wrought-iron, 8. Frozen Bog Puddle,
9. Boston Sunset, 10. Maghery, 11. Sunset, moonrise at Canada Lake, NY, 12. Under Lough Eske Bridge, 13. Fred & Blizzard, 14. Celitc Spirally Wrought Iron, 15. Big Waves, 16. The Atlantic near Dungloe, Donegal Ireland,
Thanks to bighugelabs.com
Do you remember when a phone like the Nokia 6230 was the phone to have? I remember trying to get one of these for use in the US after seeing a friend’s phone in Ireland. At the time you could only get this model on the Cingular network and the things cost hundred. This phone was a classic for it’s time and it was durable and just worked and it’s form-factor is a classic from the period.
GSMarena has specs on the phone, and Wikipedia has a badly written page about. Those things sold for hundreds of pounds/euros/dollars when they were new in 2005, now you can get one on Ebay for less than 20 quid.
And these days you can an Android phone on Amazon for as low as $30 that’s more powerful that a 2005 era laptop. And you know, I still want this phone, the only problem is I can’t read the screen as it’s too small!