This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function c { | |
cd `find ${1:-.} -type d -print | fzf` | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
import urllib | |
from optparse import OptionParser | |
URL_PATTERN="http://HOSTNAME:8080/job/{job_name}/buildWithParameters?{params}" | |
USER="XXXXXXXXXXXXXXXXXXXXXXXXXx" | |
TOKEN="XXXXXXXXXXXXXXXXXXXXX" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from itertools import ifilter | |
from collections import defaultdict as dd | |
class GEException(Exception) | |
class CircularDependencyException(GEException): | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function infinitize { | |
export tmpdir=`mktemp -d` | |
cp "$1" ${tmpdir}/in.gif | |
cd $tmpdir | |
convert in.gif frame_%05d.png | |
convert -delay 4 `ls frame_* | sed '1d;$d'` intermediate.gif | |
convert intermediate.gif -coalesce -reverse -quiet -layers OptimizePlus -loop 0 reversed.gif | |
convert in.gif reversed.gif out.gif | |
cd - | |
cp ${tmpdir}/out.gif `basename "$1" .gif`_infinite.gif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
cat short | while read line | |
do | |
export file_name="`echo $line | cut -d' ' -f 1`" | |
export line_number="`echo $line | cut -d' ' -f 2`" | |
export error_message="`echo $line | cut -d' ' -f 3-`" | |
vim "$file_name" +${line_number} | |
# echo $file_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytest | |
from _pytest.monkeypatch import MonkeyPatch | |
from mock import Mock | |
BUILTINS = set(dir(__builtins__)) | |
def _mock(monkeypatch, name, module): | |
if name in BUILTINS: | |
module = __builtins__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# contest.py | |
import pytest | |
@pytest.fixture | |
def stuff(request): | |
args = request.node.funcargs | |
param = args["param"] | |
... | |