Skip to content

Instantly share code, notes, and snippets.

View azizur's full-sized avatar

Azizur Rahman azizur

View GitHub Profile
#!/bin/sh
#
# Adam Sharp
# Aug 21, 2013
#
# Usage: Add it to your PATH and `git remove-submodule path/to/submodule`.
#
# Does the inverse of `git submodule add`:
# 1) `deinit` the submodule
# 2) Remove the submodule from the index and working directory
@pipboy3000
pipboy3000 / category_index.html
Last active March 6, 2017 10:29
DEPRECATED Jekyll 3: Jekyll category page.Template use _layouts/category_index.html, posts are page.posts.
---
layout: default
---
<div class="category-title"><span>{{ page.title }}</span></div>
{% for post in page.posts %}
<article>
<header>
<div class="date">{{ post.date | date_to_long_string }}</div>
<div class="post-meta">
@jboner
jboner / latency.txt
Last active July 25, 2025 09:04
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@amitsaha
amitsaha / install_owncloud_f16.sh
Created April 9, 2012 03:31
Install ownCloud3 on Fedora 16
#!/bin/bash
# Shell script to setup and install ownCloud3 on Fedora 16 (and later, hopefully)
# You may try on others, but it may not work
# Run it as root/sudo
# Also installs PageKite (http://pagekite.net)
# Any harm to any object animate/inanimate caused by this script
@lamprosg
lamprosg / erlang-b.js
Created March 3, 2012 20:04
Erlang B Equation - Traffic units and busy probability on GSM gateways
// Javascript: Percentage of busy
// calls with a=traffic and n lines
function erl(a,n)
{
u=1;
for(i=1;i<=n;i++)
{
u+=power(a,i)/factorial(i);
}
@oodavid
oodavid / README.md
Last active March 11, 2025 21:41 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@gre
gre / easing.js
Last active July 11, 2025 12:47
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
@paulirish
paulirish / rAF.js
Last active June 24, 2025 18:39
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
@ryan-frankel
ryan-frankel / wpapi
Created November 2, 2011 08:24
Get Info from WP Plugin API
<?php
/*
Plugin Name: WordPress API
clean, usable interface.
Version: 0.1
?>
<?php
/* *****************************************************************************
CREATE TABLE ON ACTIVATION
***************************************************************************** */
@aronwoost
aronwoost / README.md
Created July 25, 2011 19:48
Build auto-deploy with php and git(hub) on an EC2 Amazon AMI instance

Kind of continue from the other gist how to install LAMP on an Amazon AMI

##Install git

sudo yum install git-core

##Create ssh directory since it doesn't exists by default on the Amazon AMI