Skip to content

Instantly share code, notes, and snippets.

--- /root/gitweb.cgi 2014-04-02 00:19:56.885072998 +0200
+++ /usr/lib/cgi-bin/gitweb.cgi 2014-04-02 00:38:59.125072998 +0200
@@ -5822,6 +5822,7 @@
if (defined $snapshot_links) {
print " | " . $snapshot_links;
}
+ print " | ".$commit;
print "</td>\n" .
"</tr>\n";
}
~/bin/shoot.sh
Alt + Print
@guyromm
guyromm / parseprocs.py
Last active August 29, 2015 14:07
parseprocs - jenkins process type parse
#!/usr/bin/env python
# usage
# 1. run on a jenkins node to get a grouping of processes by type with memory consumption:
# ps aux | /root/parseprocs.py
# 2. get a detail of which processes were included under a particular set of tags:
# ps aux | /root/parseprocs.py celery,python,user_attrs_actions
#!/usr/bin/env coffee
http = require 'http'
fs = require 'fs'
oppressor = require 'oppressor'
Readable = require 'stream'
.Readable
server = http.createServer (req,res) =>
stream = fs.createReadStream __dirname+'/node_modules/coffee-script/lib/coffee-script/parser.js'
stream.pipe oppressor req
@guyromm
guyromm / entry.js
Created January 24, 2015 01:05
riot + webpack
//sample entry file
require('./node_modules/riot/dist/riot.js');
require('./timer.tag')
require('./todo.tag')
require('./todo.css')
riot.mount('todo', {
title: 'I want to behave!',
items: [
@guyromm
guyromm / jquery.js
Created March 7, 2011 14:29
testing.rar
/*!
* jQuery JavaScript Library v1.5.1
* http://jquery.com/
*
* Copyright 2011, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
@app.route('/socket.io/websocket')
def socketio():
s = request.environ['socketio']
if s.on_connect():
#print 'CONNECTED', locals()
#s.send({'buffer': buffer})
#s.broadcast({'announcement': s.session.session_id + ' connected'})
pass
game_id=None;game=None;cook=None;i_am='spectator';rdsub = redis.Redis('localhost') ; listener_trd = None
#redis sub listener
@guyromm
guyromm / gist:874714
Created March 17, 2011 17:11
instantphoto.co.il fixup
<div class="article-content">
<div style="float: right; width: 300px; border: 0px none;"><img height="435" width="295" alt="instax_mini" src="/images/stories/about/welcome/instax_mini.png"></div>
<!-- WHAT YOU NEED ADDED -->
<div style='float:left; max-width:50%;'>
<p dir="rtl" style="text-align: right;">צילום מיידי (Instant Photography) נוחת בישראל!</p>
<p dir="rtl" style="text-align: right;">רוצים להינות מאיכות אנלוגית? רוצים להשאיר מזכרת מוחשית לעצמכם, לחבריכם או לאנשים שפגשתם בטיול רגע לפני שהרכבת שלהם ממשיכה לכיוון הנגדי? בא לכם להנציח את הרגע ולראות את התוצאות דקות ספורות לאחר הצילום, מבלי להיעזר בשירותי מעבדת פיתוח?</p>
<p dir="rtl" style="text-align: right;">בעזרת טכנולוגיות מתקדמות תוכלו להתרגש מהתמונה המתפתחת הישר אל מול עיניכם, ואם זה לא מספיק - בין סוגי המצלמות השונות יש גם כאלה המאפשרות לשלב כל טריק ניסיוני עם צילום מיידי. מתרגשים כבר?</p>
<ul style="clear:both;">
<li dir="rtl">כאן <a href="/magazine">בגיליון</a> נפרסם סיפורים ועדכונים על צילום מיידי בארץ ובחו"ל, סקירות והסברים וגם טריקים שימושיי
@guyromm
guyromm / getphotos.py
Created April 4, 2011 10:11
my little digicam photo/movie extractor/resizer/encoder
#!/usr/bin/python
import glob,os,commands,re
from sys import argv
errcnt=0 ; donecnt=0 ; skipcnt=0
for fn in glob.glob('%s/*'%os.getcwd()):
bfn = os.path.basename(fn)
video=False ; sound=False
if re.compile('\.MP4$').search(bfn): video=True
if re.compile('\.WAV$').search(bfn): sound=True
from gevent import monkey; monkey.patch_socket()
from urllib2 import Request
from datetime import datetime# for time measurement
import unittest
import gevent
import urllib2, httplib, cookielib
import json
from config import HOST_URL, PORT