Skip to content

Instantly share code, notes, and snippets.

View umrashrf's full-sized avatar
🏠
Working from home

Umair Ashraf umrashrf

🏠
Working from home
View GitHub Profile
@umrashrf
umrashrf / push-toggl-to-redmine.py
Created April 8, 2015 14:05
Pushes Toggl entries to Redmine. Supports --dry-run to print Toggl entries without sending them to Redmine. TIP: Use this format in Toggl "#issue_id [comment]".
#!/usr/bin/env python
import re
import sys
import json
import logging
import argparse
import requests
Botswana
Namibia
St. Kitts and Nevis
St. Lucia
St. Vincent
Samoa -> Western Samoa
Swaziland
Andorra
Anguilla Footnote 1
Antigua and Barbuda
Australia
Austria
Bahamas
Barbados
Belgium
Bermuda Footnote 1
British citizens and British overseas citizens - A British citizen or a British overseas citizen who is re-admissible to the United Kingdom.
@umrashrf
umrashrf / beep
Created February 21, 2015 17:17
Ubuntu 14.04.1 Cutom Beep
$ echo $PATH
~/bin
$ cat ~/bin/beep
paplay /usr/share/sounds/freedesktop/stereo/complete.oga
@umrashrf
umrashrf / enable_unity_low_gfx_mode
Last active August 29, 2015 14:13
Make your Ubuntu 14.04.1 LTS a little bit faster with this one tweak. Enable UNITY_LOW_GFX_MODE.
Append following line to your ~/.profile file.
export UNITY_LOW_GFX_MODE="1"
Now log out and log in back.
{"sku":"02366 20","productRef":"02366 20@1401-B1","image":"http://media.wuerth.com/stmedia/shop/348px/1337528.jpg","shortInfo":"Stahl verzinkt<br>SHR-BLA-(A2K)-M6X20","pdfCatalogPage":["http://media.wuerth.com/stmedia/shop/masterpages0000/LANG_de/03721.pdf"],"catalogSheet":"http://eshop.wuerth.de/stmedia/Blaetterkatalog/Gesamtkatalog/index.php?mode=or&searchquery=03721&hook_url=http://eshop.wuerth.de/-/","documentInfoMap":{},"cadValue":null,"showCadValue":null,"msdsInformations":[],"technicalInformation":"<table class=\"tech_table\"><tbody><tr><td class=\"tech_col_left\"><p>Nenndurchmesser</p></td><td class=\"tech_col_left\"><p>6 mm</p></td></tr><tr><td class=\"tech_col_left\"><p>Werkstoff</p></td><td class=\"tech_col_left\"><p>Stahl</p></td></tr><tr><td class=\"tech_col_left\"><p>Oberfläche</p></td><td class=\"tech_col_left\"><p>Verzinkt</p></td></tr><tr><td class=\"tech_col_left\"><p>Lochdurchmesser</p></td><td class=\"tech_col_left\"><p>8 mm</p></td></tr><tr><td class=\"tech_col_left\"><p>Länge</p></td>
@umrashrf
umrashrf / tsocks_error
Last active November 18, 2015 16:41
ERROR: ld.so: object '/usr/lib/libtsocks.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
If you get this error on Ubuntu 14.04.1 LTS then you need to copy /lib/libtsocks.so
$ sudo cp /lib/libtsocks.so /usr/lib/libtsocks.so
@umrashrf
umrashrf / donotsuspendonlidclose.txt
Created September 11, 2014 20:04
Ubuntu 14.04.1 LTS (trusty) do nothing on lid close event
Open the /etc/systemd/logind.conf file in a text editor as root, for example,
sudo -H gedit /etc/systemd/logind.conf
Add a line HandleLidSwitch=ignore (make sure it's not commented out!),
Restart the systemd daemon with this command:
sudo restart systemd-logind
@umrashrf
umrashrf / facebook.sh
Created September 3, 2014 09:25
Force a language on Facebook by cookie (for scraping purpose)
curl --cookie "locale=en_US" https://www.facebook.com/
@umrashrf
umrashrf / vcard-split.py
Last active September 7, 2018 21:49 — forked from szczys/vcard-split.py
#!/usr/bin/python
#split vcf files
import re
working_dir = '/home/umair/Documents/Contacts/'
input_file = 'contacts starred 26-06-2014.vcf'
output_seed = 'contacts-part-'
vcards_per_file = 1