Skip to content

Instantly share code, notes, and snippets.

View devlato's full-sized avatar
🐯
🦜🐨🦘

Denis Tokarev devlato

🐯
🦜🐨🦘
View GitHub Profile
@emiralp
emiralp / gist:010e3cc7119ab4a39d4b
Last active March 12, 2018 10:33
cmd.fm api v.1 (beta)

USERS

/api/users/sign_up
	username				(Required)
	email					(Required)
	password				(Required)
	password_confirmation	(Required)
	
/api/users/sign_in

username_or_email (Required)

Collection of oneliner music formulas. Version 2011-10-18
I've tried to collect all the formulas in the related threads etc.
(excluding those that clearly sound like random first experiments or total
crap; when several variants are available, i've chosen the shortest one)
If you think I've missed something that should be here, please let me know.
====== 1ST ITERATION ======
import tornado.ioloop
import tornado.web
import tornado.auth
import tornado.gen
from tornado.options import parse_command_line, define, options
define("port", default=8888)
define("debug", default=False)
import tornado.ioloop
import tornado.web
from tornado.options import parse_command_line, define, options
define("port", default=8888)
define("debug", default=False)
class AuthHandler(tornado.web.RequestHandler):
def get(self):
import tornado.ioloop
import tornado.web
from tornado.options import parse_command_line, define, options
define("port", default=8888)
define("debug", default=False)
class AuthHandler(tornado.web.RequestHandler):
def get(self):
@dougalcampbell
dougalcampbell / phpfpm-mon.cron
Created February 14, 2012 19:45
Crontab entry to monitor for php-fpm problems
## Auto-restart PHP when it's returning errors
#
# Make sure that http://localhost/test.php is an actual PHP script. If it starts returning
# 500 errors, restart the PHP-FPM service
* * * * * /usr/bin/curl --head -sf http://localhost/test.php -o /dev/null || /usr/sbin/service php5-fpm restart
import tornado.ioloop
import tornado.web
# http://www.tornadoweb.org/en/stable/options.html
from tornado.options import parse_command_line, define, options
define("port", default=8888)
define("debug", default=False)
class MainHandler(tornado.web.RequestHandler):
@Couto
Couto / webpack.js
Last active November 11, 2020 17:53
Fetch polyfill with webpack
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var path = require('path');
var folders = {
APP: path.resolve(__dirname, '../app'),
BUILD: path.resolve(__dirname, '../build'),
BOWER: path.resolve(__dirname, '../bower_components'),
NPM: path.resolve(__dirname, '../node_modules')
};
@branneman
branneman / app.js
Last active February 5, 2021 21:58
Node.js application entry-point files
#!/usr/bin/env node
'use strict';
var spawn = require('child_process').spawn;
var args = [
'--harmony',
'app/bootstrap.js'
];
@rymawby
rymawby / undo-git-rebase.sh
Created June 14, 2013 18:37
Undoing a git rebase
# find head commit
git reflog
# now reset hard - where N is the head commit found in the reflog
git reset --hard HEAD@{N}