Skip to content

Instantly share code, notes, and snippets.

View shimon's full-sized avatar

Shimon Rura shimon

  • Verily
  • Boston, MA
View GitHub Profile
@shimon
shimon / fix-webcams.sh
Created January 25, 2018 22:54
Linux shell script to disable an internal webcam if an external one is attached, or enable the internal one if not.
#!/bin/bash
# Quick script to disable an internal webcam if an external one is attached, or
# enable the internal one if the external one's not attached.
# by Shimon Rura, 25 Jan 2018. In the public domain.
# To use, run `lsusb` and identify the lines for your internal and external camera devices.
# For example, mine are:
# internal:

Keybase proof

I hereby claim:

  • I am shimon on github.
  • I am shimon (https://keybase.io/shimon) on keybase.
  • I have a public key ASClfxpHklxZBztBai-L0hC5nNuUqfFOs7j8QBrYwTLwxAo

To claim this, I am signing this object:

@shimon
shimon / gzip_test.py
Created March 19, 2012 14:20
Some code to check for gzip compression on an HTTP host
#!/usr/bin/python
import httplib
from pprint import pprint
if __name__ == "__main__":
url = "/"
#url = '/static/css/style.css'
conn = httplib.HTTPConnection('127.0.0.1')
conn.putrequest("GET", url, skip_host=True)
@shimon
shimon / gist:2003069
Created March 8, 2012 19:58
Odd test session 404
192.168.56.1 - - [08/Mar/2012:14:35:29 -0500] "GET /test/%2780s_trivia?partner=1&q=10&title=Your%20Mission&back_to=http%3A%2F%2Fgoogle.com&partner_name=Mysite HTTP/1.1" 302 0 "http://dev.smarterer.com/about/mission" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:12.0a2) Gecko/20120307 Firefox/12.0a2"
## first TS id: 322171
192.168.56.1 - - [08/Mar/2012:14:35:29 -0500] "GET /test/%2780s_trivia/ts/322171?back_to=http%3A%2F%2Fgoogle.com&title=Your+Mission&partner_name=Mysite&q=10&partner=1 HTTP/1.1" 200 4082 "http://dev.smarterer.com/about/mission" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:12.0a2) Gecko/20120307 Firefox/12.0a2"
192.168.56.1 - - [08/Mar/2012:14:35:30 -0500] "GET /test/%2780s_trivia/ts/322171/tiles.js HTTP/1.1" 200 240 "http://dev.smarterer.com/test/%2780s_trivia/ts/322171?back_to=http%3A%2F%2Fgoogle.com&title=Your+Mission&partner_name=Mysite&q=10&partner=1" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:12.0a2) Gecko/20120307 Firefox/12.0a2"
192.168.56.1 - - [08/Mar/2012:14:35:30 -0500] "GET /image
@shimon
shimon / many-cats.conf
Created July 7, 2011 01:03
Supervisor Conf file to run 1100 processes
[program:cat-0]
command=/bin/cat
autostart=true
[program:cat-1]
command=/bin/cat
autostart=true