Skip to content

Instantly share code, notes, and snippets.


Eriks Vitolins evitolins

View GitHub Profile
Atem18 / gist:4696071
Last active Nov 23, 2020 — forked from evildmp/gist:3094281
Tutorial to seting up a django website in production.
View gist:4696071

Set up Django, Nginx and Gunicorn in a Virtualenv controled by Supervisor

Steps with explanations to set up a server using:

  • Virtualenv
  • Virtualenvwrapper
  • Django
  • Gunicorn
naholyr / monkey-patch.js
Created Dec 21, 2012
JS monkey patching
View monkey-patch.js
// Original method
var object = {
method: function (x, y) {
return x+y;
// Add operations before or after!
object.method = (function (original) {
return function (x, y) {
derekkwok /
Last active Nov 23, 2020
Simple python script to encode videos using ffmpeg
This python script encodes all files that have the extension mkv in the current
working directory.
import subprocess, os
santazhang /
Created Mar 4, 2012
Python script to compile and install ffmpeg
#!/usr/bin/env python
# Python script to compile and install ffmpeg.
# part of ffcluster project.
# see full project at
# Author: Santa Zhang <>
import os
gre / easing.js
Last active Nov 25, 2020
Simple Easing Functions in Javascript - see
View easing.js
* Easing Functions - inspired from
* only considering the t value for the range [0, 1] => [0, 1]
EasingFunctions = {
// no easing, no acceleration
linear: t => t,
// accelerating from zero velocity
easeInQuad: t => t*t,
// decelerating to zero velocity
justinfx /
Last active Dec 24, 2019
Mixing PyQt4 and Maya UI objects
from PyQt4 import QtCore, QtGui
import maya.cmds as cmds
import maya.OpenMayaUI as mui
import sip
class MyDialog(QtGui.QDialog):
cowboy /
Last active Nov 26, 2020
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.
isaacs /
Last active Nov 27, 2020
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl | sh
View video-client.html
<!-- This is a Node+WebSocket powered demo to sync videos
across different browsers. This file is the client,
the other one is the Node server. Powered by Node and -->
.inactive { display: none; }
.active { display: block; }
You can’t perform that action at this time.