Skip to content

Instantly share code, notes, and snippets.

Daniel Serodio dserodio

Block or report user

Report or block dserodio

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dserodio
dserodio / google.xsd
Created May 13, 2011
Google DTD converted to a XML Schema (XSD) using Trang
View google.xsd
<?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"/>
View 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 Oct 22, 2013
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// 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 Nov 29, 2018
Wait for some text in a log file
View wait_for_line_in_log.sh
{ tail -n +1 -f file.log & } | sed -n '/Initialization finished/q'
View keybase.md

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 Apr 29, 2014
Installing PyQT for IPython QtConsole on Mac
View install_ipython_pyqt_.sh
brew install zeromq pyqt
pip install ipython pyzmq pygments
View jenkins-git-backup.sh
#!/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 Aug 31, 2018 — forked from anonymous/gist:223853355d67123fdda8
Shell script to start/stop an EC2 instance to use as a ssh tunnel
View tunnel.sh
#!/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 Aug 3, 2016
Python logging setup
View log.py
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 Feb 4, 2015
Upgrade Brew if on OS X or apt-get otherwise. If parameter is received, upgrade a remote (Ubuntu) machine
View upgrade.sh
if [ -z $1 ]
then
if [ "$OS" == "Darwin" ]
then
echo "Updating…"
brew update
echo "Upgrading…"
brew upgrade
else
sudo apt-get update
You can’t perform that action at this time.