Skip to content

Instantly share code, notes, and snippets.

View mcnemesis's full-sized avatar
💭
v:TEA|h:{know some u:code poetry?}|g!:_*\0/*_

Nemesis Fixx Da JWL mcnemesis

💭
v:TEA|h:{know some u:code poetry?}|g!:_*\0/*_
View GitHub Profile
http://www.advance-africa.com/
http://www.scholarshipforafricans.com/
http://scholarship-positions.com/
http://allscholarships.info/
http://www.scholars4dev.com/
------ OTHERS ------
1. Australia Award Scholarship : http://australiaawardsindo.or.id
@mcnemesis
mcnemesis / ImportADUsersIntoLync.ps1
Created December 21, 2015 10:40
How to automatically import all (or some) AD users into Lync
Get-ADUser -filter {name -like "*"} | Select SamAccountname | Foreach { $username=$_.SamAccountname; enable-csuser -identity REA\${username} -RegistrarPool YOUR.POOL.FQDN -SipAddressType EmailAddress }
- ensure to have the `~/.vim/plugin` directory
- clone the vim-autopep8 plugin git repo into your .vim:
git clone https://github.com/tell-k/vim-autopep8.git
- symlink the plugin file into your vim plugins directory
ln -s $(realpath -f vim-autopep8/ftplugin/python_autopep8.vim) plugin
- open your python file using vim
@mcnemesis
mcnemesis / upgrade_wordpress_wpcli.sh
Last active August 29, 2015 14:25
This is how to upgrade your WordPress site, its plugins and themes automatically via a shell, using wp-cli
#!/bin/bash
#requires: wp-cli installed
# run all the following commands inside your wordpress root directory
wp core update #updates wp itself
wp plugin update --all #update all plugins
wp theme update -all #update all themes
@mcnemesis
mcnemesis / trace_debug_azure_website.ps1
Created January 14, 2015 18:56
This gist shows how you can trace debug your website (e.g a php site) that's on Azure, directly from the Powershell command line.
azure account import PATH_TO_YOUR_AZURE_PUBLISH_SETTINGS_FILE
azure site log tail YOUR_AZURE_WEBSITE_NAME
@mcnemesis
mcnemesis / uganda_districts.txt
Created June 4, 2014 07:23
List of all current (as of 2014) Uganda's Districts - useful in forms-authoring and other tasks of your liking (source : http://www.statoids.com/uug.html)
Abim
Adjumani
Agago
Alebtong
Amolatar
Amudat
Amuria
Amuru
Apac
Arua
@mcnemesis
mcnemesis / the_fix.py
Created June 2, 2014 14:13
Fixes the nasty bug!
try:
from PIL import Image, ImageOps
except ImportError:
import Image, ImageOps
@mcnemesis
mcnemesis / troublesomw_import_django-stdimage.py
Created June 2, 2014 14:05
The troublesome import in django-stdimage/stdimage/fields.py
try:
import Image, ImageOps
except ImportError:
from PIL import Image, ImageOps
@mcnemesis
mcnemesis / Python_Imaging_Bug_on_Debian-711343.py
Created June 2, 2014 13:57
Highlighting some nasty bug in Python Imaging, common to Debian currently
>>> import Image
>>> Image.open("file.png")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 2020, in open
raise IOError("cannot identify image file")
IOError: cannot identify image file
>>> from PIL import Image
>>> Image.open("file.png")
<PngImagePlugin.PngImageFile image mode=RGB size=40x40 at 0x25690E0>