Skip to content

Instantly share code, notes, and snippets.

Privacy Policy

Last revised on [DATE]

The Gist

[COMPANY] will collect certain non-personally identify information about you as you use our sites. We may use this data to better understand our users. We can also publish this data, but the data will be about a large group of users, not individuals.

We will also ask you to provide personal information, but you'll always be able to opt out. If you give us personal information, we won't do anything evil with it.

@diorahman
diorahman / client.html
Created December 26, 2011 03:34
Ajax, call jQuery POST to node.js expressjs
<html>
<head>
<title>jsonp test</title>
<script src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<script type="text/javascript">
$(function(){
$('#select_link').click(function(e){
e.preventDefault();
console.log('select_link clicked');
@gre
gre / easing.js
Last active September 5, 2025 07:01
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 = {
@kuleszaj
kuleszaj / gist:1911020
Created February 25, 2012 21:48
Simple nginx load balancer and reverse proxy.
upstream rails_application {
server 10.0.0.1 max_fails=1 fail_timeout=10s;
server 10.0.0.2 max_fails=1 fail_timeout=10s;
# and so on: server 10.0.0.x;
}
upstream legacy_php_application {
server 10.0.1.1 max_fails=1 fail_timeout=10s;
}
server {
@danielestevez
danielestevez / gist:2044589
Last active November 6, 2025 20:14
GIT Commit to an existing Tag
1) Create a branch with the tag
git branch {tagname}-branch {tagname}
git checkout {tagname}-branch
2) Include the fix manually if it's just a change ....
git add .
git ci -m "Fix included"
or cherry-pick the commit, whatever is easier
git cherry-pick {num_commit}
@mikhailov
mikhailov / 0. nginx_setup.sh
Last active August 29, 2025 05:48
NGINX+SPDY with Unicorn. True Zero-Downtime unless migrations. Best practices.
# Nginx+Unicorn best-practices congifuration guide. Heartbleed fixed.
# We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies.
# Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module
#
# Deployment structure
#
# SERVER:
# /etc/init.d/nginx (1. nginx)
# /home/app/public_html/app_production/current (Capistrano directory)
#
@danburzo
danburzo / README.md
Last active July 29, 2021 08:41
Get all event listeners on the page in Google Chrome
@staltz
staltz / introrx.md
Last active December 1, 2025 11:31
The introduction to Reactive Programming you've been missing
@yangchristian
yangchristian / Graph.js
Last active November 24, 2023 00:14
WebGL Network Graph using Three.js
/**
@author David Piegza
Implements a graph structure.
Consists of Graph, Nodes and Edges.
Nodes:
Create a new Node with an id. A node has the properties
id, position and data.
@willprice
willprice / .travis.yml
Last active June 10, 2025 17:13
How to set up TravisCI for projects that push back to github
# Ruby is our language as asciidoctor is a ruby gem.
lang: ruby
before_install:
- sudo apt-get install pandoc
- gem install asciidoctor
script:
- make
after_success:
- .travis/push.sh
env: