Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel Serodio dserodio

View GitHub Profile
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 / 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
View fabric_ssh_agent.py
def _shell_escape(string):
""" Escape double quotes, backticks and
dollar signs in given ``string``.
For example:
>>> _shell_escape('abc$') 'abc\\\\$'
>>> _shell_escape('"') '\\\\"'
"""
for char in ('"', '$', '`'):
View lockable_script_boilerplate.sh
#!/bin/bash
## Copyright (C) 2009 Przemyslaw Pawelczyk <przemoc@gmail.com>
## License: GNU General Public License v2, v3
#
# Lockable script boilerplate
### HEADER ###
LOCKFILE="/var/lock/`basename $0`"
@dserodio
dserodio / ssh_keys_match.sh
Created Jun 18, 2015
Test if a RSA keypair matches
View ssh_keys_match.sh
# http://serverfault.com/a/426429/55687
PRIVKEY=id_rsa
TESTKEY=id_rsa.pub
diff <( ssh-keygen -y -e -f "$PRIVKEY" ) <( ssh-keygen -y -e -f "$TESTKEY" )
@dserodio
dserodio / wget.ps1
Created Jun 26, 2015
Download a remote URL using Powershell
View wget.ps1
param(
[String] $remoteUrl,
[String] $localPath
)
$webClient = new-object System.Net.WebClient;
$webClient.DownloadFile($remoteUrl, $localPath);
@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"/>
@dserodio
dserodio / stacktrace.log
Last active Oct 8, 2015
Jenkins stacktrace of a folder after updating to Build Pipeline View 1.8
View stacktrace.log
javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException: jar:file:/var/cache/jenkins/war/WEB-INF/lib/jenkins-core-1.609.1.jar!/hudson/model/View/index.jelly:42:43: <st:include> org.apache.commons.jelly.JellyTagException: jar:file:/var/cache/jenkins/war/WEB-INF/lib/jenkins-core-1.609.1.jar!/lib/hudson/projectView.jelly:67:24: <d:invokeBody> java.lang.ClassCastException
at org.kohsuke.stapler.jelly.JellyClassTearOff.serveIndexJelly(JellyClassTearOff.java:117)
at org.kohsuke.stapler.jelly.JellyFacet.handleIndexRequest(JellyFacet.java:127)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:735)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:813)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:249)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
You can’t perform that action at this time.