Skip to content

Instantly share code, notes, and snippets.

View dserodio's full-sized avatar
🐕

Daniel Serodio dserodio

🐕
View GitHub Profile
@dserodio
dserodio / google.xsd
Created May 13, 2011 22:17
Google DTD converted to a XML Schema (XSD) using Trang
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="GSP">
<xs:complexType>
<xs:choice>
<xs:sequence>
<xs:element ref="TM"/>
<xs:element ref="Q"/>
<xs:element maxOccurs="unbounded" ref="PARAM"/>
<xs:element minOccurs="0" ref="SEARCH_MODES"/>
@dserodio
dserodio / Vagrantfile
Last active October 14, 2020 12:00 — forked from lorn/Vagrantfile
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.provider :virtualbox do |vb|
vb.name = "ubuntu.local"
vb.customize [ 'modifyvm', :id, '--memory', '512' ]
vb.customize [ 'modifyvm', :id, '--cpus', '1' ]
end
@dserodio
dserodio / 0_reuse_code.js
Created October 22, 2013 12:45
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
@dserodio
dserodio / wait_for_line_in_log.sh
Last active November 29, 2018 15:29
Wait for some text in a log file
{ tail -n +1 -f file.log & } | sed -n '/Initialization finished/q'
@dserodio
dserodio / keybase.md
Last active October 14, 2020 12:00
Keybase proof

Keybase proof

I hereby claim:

  • I am dserodio on github.
  • I am dserodio (https://keybase.io/dserodio) on keybase.
  • I have a public key whose fingerprint is CFB1 D267 024B 720A F4F5 27AB 6C51 A8CC BB58 BCC8

To claim this, I am signing this object:

@dserodio
dserodio / install_ipython_pyqt_.sh
Created April 29, 2014 22:00
Installing PyQT for IPython QtConsole on Mac
brew install zeromq pyqt
pip install ipython pyzmq pygments
#!/bin/bash
#
# Copies certain kinds of known files and directories from a given Jenkins master directory
# into a git repo, removing any old ones, adds 'em, commits 'em, pushes 'em.
#
set -ex
if [ $# -ne 2 ]; then
echo usage: $0 root_dir jenkins_master
@dserodio
dserodio / tunnel.sh
Last active August 31, 2018 20:43 — forked from anonymous/gist:223853355d67123fdda8
Shell script to start/stop an EC2 instance to use as a ssh tunnel
#!/bin/bash
# Start/stop an EC2 instance to use as a ssh tunnel
# requires the aws package locally -- sudo apt-get install awscli
#
# usage: ./tunnel.sh start (spin up EC2 and create the tunnel)
# ./tunnel.sh stop (terminate the EC2 instance to save money)
# ./tunnel.sh resume (in case your tunnel is interrupted but the EC2 instance is still running)
# CHANGE THE PARAMETERS BELOW
@dserodio
dserodio / log.py
Last active August 3, 2016 13:22
Python logging setup
import logging
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(levelname)-.5s %(message)s')
logging.getLogger('requests').setLevel(logging.WARN)
@dserodio
dserodio / upgrade.sh
Created February 4, 2015 13:00
Upgrade Brew if on OS X or apt-get otherwise. If parameter is received, upgrade a remote (Ubuntu) machine
if [ -z $1 ]
then
if [ "$OS" == "Darwin" ]
then
echo "Updating…"
brew update
echo "Upgrading…"
brew upgrade
else
sudo apt-get update