Skip to content

Instantly share code, notes, and snippets.

View amad's full-sized avatar
🚀
(⌐■_■)

Ahmad Samiei amad

🚀
(⌐■_■)
View GitHub Profile
packages:
fswebcam
motion
mencoder
avconv
fswebcam -r 640x480 -S 15 --flip h --jpeg 95 --shadow --title "SLB Labs" --subtitle "Home" --info "Monitor: Active @ 1 fpm" --save home.jpg -q -l 60
# to find out the configuration commands, run: h2o --help
user: www-data
hosts:
"example.com":
listen:
host: xx.xx.xx.xx
port: 443

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

PHP_FUNCTION(publicize)
{
char *classname = NULL;
int classname_len;
ulong i;
char *str;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
&classname, &classname_len) == FAILURE) {
return;
@amad
amad / freeslashboot.txt
Last active September 3, 2016 15:59
free up /boot
dpkg --get-selections|grep 'linux-image*'|awk '{print $1}'|egrep -v "linux-image-$(uname -r)|linux-image-generic" |while read n;do apt-get -y remove $n;done
sudo apt-get purge $(dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve "$(uname -r | sed -r 's/-[a-z]+//')")
.home .clouds,.home .clouds2 {
background:url("https://assets.litmuscdn.com/images/next/index/cloud.svg");
position:absolute;
z-index:1;
width:2000px;
-webkit-animation:clouds 60s linear infinite;
-moz-animation:clouds 60s linear infinite;
-o-animation:clouds 60s linear infinite;
opacity:0.15;
height:345px;
@amad
amad / tmux-cheatsheet.markdown
Last active August 3, 2017 13:41 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

Todo: ctl+b+[ scroll mode

q quit scroll mode

ctl+b ctl+o rotate panes

tmux shortcuts & cheatsheet

start new:

<canvas></canvas>
<script>
document.addEventListener('touchmove', function (e) {
e.preventDefault()
})
var c = document.getElementsByTagName('canvas')[0],
x = c.getContext('2d'),
pr = window.devicePixelRatio || 1,
w = window.innerWidth,
h = window.innerHeight,
@amad
amad / md5_device_fingerprint.js
Created March 10, 2016 05:51 — forked from splosch/md5_device_fingerprint.js
Browser and device fingerprinting - a MD5 checksum generator to identify a device-browser-combination
(function(window, document, JSON){
"use strict";
var SEP = '|', ua, opera, ie;
/*
* Collect Browser & Device Data
*/
var Collector = {
/*
* MD5 Checksum calculation
*/
1051541451431641621571721571511441234567881234567812345678123678326470547
2999999259923478990124999995689902993413269916749953349999914649932724997
2994567809912568990139956799809929936781467998299634699818991169966144990
2999994569970124995699801323459999012615302799995324993243699019923412993
2994567801993569980299356780239999456725634569974326992644399243992369936
2994567801992689901239967899029939945745315319931253399436998011992349950
2998012345299999388352999991039953991232012479934673289999982640499999415