Skip to content

Instantly share code, notes, and snippets.

Aziz M. Bookwala azizmb

View GitHub Profile
@brunodles
brunodles / Youtube_Id.regex
Last active Aug 3, 2018
This is a youtube regex to get video id
View Youtube_Id.regex
(?:https?:\/\/)?(?:www\.)?youtu\.?be(?:\.com)?\/?.*(?:watch|embed)?(?:.*v=|v\/|\/)([\w\-_]+)\&?
@eimajtrebor
eimajtrebor / darktable-workflow.md
Last active Dec 27, 2018
My Darktable Workflow
View darktable-workflow.md

My Darktable Workflow

Basic workflow

  • Copy a film roll (a directory of RAW images) into a directory on the machine running Darktable.
  • Import the film roll into Darktable.
  • Review the images using lighttable mode and remove any images that are beyond repair.
  • Take a snapshot of the image so we can do a before and after comparison.
  • Adjust the white balance.
  • Exposure compensation and recovery.
@hadess
hadess / tmp.c
Created Oct 5, 2013
Hack to control the keyboard backlight level on a Thinkpad Lenovo X1 Carbon Touch
View tmp.c
/* gcc -o tmp `pkg-config --libs --cflags glib-2.0` tmp.c
*
* # modprobe ec_sys
*
* # watch -n 0.1 hexdump -C /sys/kernel/debug/ec/ec0/io
*
* 00000000 a7 05 a0 e2 00 86 05 00 00 00 47 00 00 03 00 10 |..........G.....|
* 00000000 a7 05 a0 e2 00 86 05 00 00 00 47 00 00 43 00 10 |..........G..C..|
* 00000000 a7 05 a0 e2 00 86 05 00 00 00 47 00 00 83 00 10 |..........G.....|
@plentz
plentz / nginx.conf
Last active Apr 23, 2019
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
View .fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
Documented at
http://linux.die.net/man/5/fonts-conf
To check font mapping run the command at terminal
$ fc-match 'helvetica Neue'
@izazueta
izazueta / visor-archivos-online.md
Last active Mar 20, 2019
Google Docs Viewer & Office Web Apps Viewer
View visor-archivos-online.md

Google Docs Viewer

Only files under 25 MB can be previewed with the Google Drive viewer.

Google Drive viewer helps you preview over 16 different file types, listed below:

  • Image files (.JPEG, .PNG, .GIF, .TIFF, .BMP)
  • Video files (WebM, .MPEG4, .3GPP, .MOV, .AVI, .MPEGPS, .WMV, .FLV)
  • Text files (.TXT)
  • Markup/Code (.CSS, .HTML, .PHP, .C, .CPP, .H, .HPP, .JS)
  • Microsoft Word (.DOC and .DOCX)
@recamshak
recamshak / gist:4124194
Created Nov 21, 2012
Install graphite in a virtualenv (for my webfaction server)
View gist:4124194
# this script will install whisper, carbon and graphite-web on the current directory
sudo apt-get python-dev
mkvirtualenv --system-site-packages graphite
pip install twisted
pip install django
pip install django-tagging
pip install gunicorn
@areina
areina / emacs-email-setup.md
Created Oct 12, 2012
Manage your email in emacs with mu4e
View emacs-email-setup.md

Manage your gmail account in emacs with mu4e

There're a lot of combinations to manage your email with emacs, but this works for me. I've a backup and I can manage my daily email.

The stack:

  • emacs
  • offlineimap
  • mu
  • mu4e
View gist:3780346
server {
listen 80;
server_name <url>;
root /var/www/html;
location / {
@vigneshwaranr
vigneshwaranr / migrator.sh
Created Aug 24, 2012
Script to convert SQLITE dumps into PostgreSQL compatible dumps
View migrator.sh
#! /bin/sh
usage_error () {
echo 'Usage: sh migrator.sh <path to sqlite_to_postgres.py> <path to sqlite db file> <an empty dir to output dump files>'
echo
echo 'Example:'
echo '>sh migrator.sh sqlite_to_postgres.py ~/reviewboard.db /tmp/dumps'
echo
echo 'Tested on:'
echo 'Python 2.7.3'
You can’t perform that action at this time.