Skip to content

Instantly share code, notes, and snippets.

View tudisco's full-sized avatar

Jason Tudisco tudisco

  • San Miguel de Allende
View GitHub Profile

Keybase proof

I hereby claim:

  • I am tudisco on github.
  • I am tudisco (https://keybase.io/tudisco) on keybase.
  • I have a public key ASBEcdd_zbRSP5ztAkvEMlDLNUFpTJByn1IhcLu07KORoQo

To claim this, I am signing this object:

@tudisco
tudisco / lazyload_google_analytics.html
Created October 20, 2018 22:49 — forked from Nilpo/lazyload_google_analytics.html
Lazy load Google Analytics
<script type="text/javascript">
(function($) {
$("body").load(function() {
setTimeout(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
}, 1);
});
})(jQuery);
@tudisco
tudisco / init.js
Created June 6, 2017 12:53
Electron Save Window Position
const {app, BrowserWindow} = require('electron')
const Config = require('electron-config')
const config = new Config()
let win
app.on('ready', () => {
let opts = {show: false}
Object.assign(opts, config.get('winBounds'))
win = new BrowserWindow(opts)
win.loadURL(`file://${__dirname}/app/index.html`)
@tudisco
tudisco / PipUpdateAll.cmd
Last active January 11, 2017 04:33
Pip update all packages windows
# This is probably faster
#for /F "delims= " %i in ('pip list --outdated') do pip install -U %i
for /F "delims===" %i in ('pip freeze -l') do pip install -U %i
@tudisco
tudisco / graphite-client.py
Last active July 11, 2016 06:24 — forked from codification/graphite-client.py
Graphite client in python
import sys
import time
import socket
def now():
return int(time.time())
def collect_metric(name, value, timestamp=None):
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.connect( ("localhost", 2003) )
@tudisco
tudisco / gist:1348e694e5e18d94f2a9
Created October 21, 2015 21:08 — forked from ward/gist:8742475
Dump rtsp into mp4 file
ffmpeg -i rtsp://yourlinkhere -acodec copy -vcodec copy FILENAME.mp4
@tudisco
tudisco / requirements.txt
Created October 21, 2015 21:07 — forked from mosquito/requirements.txt
RTSP to HTTP python proxy
tornado>4
construct
vlc -I dummy -d rtsp://192.168.0.99/video.mjpg --no-sout-audio --sout "#transcode{vcodec=MJPG,vb=1000,fps=15}:standard{access=http{mime=multart/x-mix-replace;boundary=myboundary},mux=mpjpeg,dst=:8090/cam.mjpg}"
@tudisco
tudisco / gist:4b93df380df285e0a96e
Created October 21, 2015 21:06 — forked from aborilov/gist:a90c737e7145ebc26a87
streaming rtsp to html5
gst-launch-1.0 --gst-debug=0 rtspsrc location=rtsp://rtsp.algont:4000/eVn5uSYhxRf84A6Hs5193 ! rtph264depay ! h264parse ! matroskamux ! tcpserversink host=192.168.2.147 port=8801
@tudisco
tudisco / 0_reuse_code.js
Created October 15, 2015 08:57
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console