Skip to content

Instantly share code, notes, and snippets.

View iopsthecloud's full-sized avatar

Renaud R. iopsthecloud

View GitHub Profile
$ ./rt-stats
RequestTracker-Stats April 2011
===================================================
Resolved ticket statistic for this month (April)
---------------------------------------------------
Tracy |##################### (22)
Amelie |##################### (22)
Kiri |############ (13)
Tersina |########## (11)
@Atinux
Atinux / app.js
Created December 27, 2011 00:33
Backbone JS infinite data with Node JS and Express JS
/*
** Client side - /public/src/app.js
*/
var myApp = {
// Collections
Collections: {
list: Backbone.Collection.extend()
},
// Views
@ruudud
ruudud / gist:1922646
Created February 27, 2012 09:08
Underscore templates with Django syntax
// Ovveride Underscore.js' template format
_.templateSettings = {
evaluate: /\{%([\s\S]+?)%\}/g,
interpolate: /\{\{(.+?)\}\}/g
};
@endolith
endolith / readme.md
Last active May 22, 2024 07:13
How to stream a webcam to a web browser in Ubuntu

Grr this took hours to figure out. I was trying to install MJPG-streamer and running VLC command lines and all this crap but nothing worked.

First install motion:

~> sudo apt-get install motion

Then create a config file:

~> mkdir ~/.motion

~> nano ~/.motion/motion.conf

@wickman
wickman / INSTALL.md
Created April 12, 2012 22:54
installing Pants

Installing / troubleshooting pants

Requirements

Most of the commons python environment has been developed against CPython 2.6. Things mostly work with CPython 2.7 and recent efforts have been made to improve CPython 3.x and PyPy compatibility. We've explicitly ignored anything prior to CPython 2.6 and in fact generally discourage use against anything less than CPython 2.6.5 as there are known bugs that we're unwilling to fix. We've never even tried running against Jython or

@pthrasher
pthrasher / deck.md
Created May 29, 2012 18:24
GistDeck for Charlotte Python Meetup

Who am I?

Philip Thrasher

Web hacker at a private cyber security company.

What I Do

@69mb
69mb / lmtpd.py
Created August 17, 2012 12:57 — forked from clarkbw/lmtpd.py
A python LMTP server using the smtpd module
#!/bin/env python
from smtpd import SMTPChannel, SMTPServer
import asyncore
class LMTPChannel(SMTPChannel):
# LMTP "LHLO" command is routed to the SMTP/ESMTP command
def smtp_LHLO(self, arg):
self.smtp_HELO(arg)
@christiannelson
christiannelson / 0.config
Created November 26, 2012 00:08
Using HAProxy with Node.js, Socket.io and SSL
global
nbproc 1
maxconn 65536
defaults
timeout connect 5s
timeout queue 5s
timeout server 30s
timeout tunnel 1h
@marvin
marvin / client.py
Created December 17, 2012 13:50
simple python client/server socket binary stream
import socket
HOST = 'localhost'
PORT = 9876
ADDR = (HOST,PORT)
BUFSIZE = 4096
videofile = "videos/royalty-free_footage_wien_18_640x360.mp4"
bytes = open(videofile).read()
@stwalkerster
stwalkerster / postmanage.sh
Created December 28, 2012 22:30
Postfix queue management script
#!/bin/bash
app="whiptail --backtitle 'Postfix Queue Manager - stwalkerster.net Cluster' --clear --nocancel"
while true; do
queue=`ls /var/spool/postfix/hold/`
menulist=""
for i in $queue; do