This file contains hidden or 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 | |
# Symlinks PySide from global installation into virtualenv site-packages | |
platform='unknown' | |
unamestr=$(uname) | |
if [[ "$unamestr" == 'Linux' ]]; then | |
platform='linux' | |
elif [[ "$unamestr" == 'Darwin' ]]; then | |
platform='darwin' | |
fi |
This file contains hidden or 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
# Borrowed from: https://github.com/glue-viz/glue/blob/master/setup.py | |
# Copyright (c) 2013, Glue developers | |
import os | |
import subprocess | |
import sys | |
from glob import glob | |
from setuptools import Command |
This file contains hidden or 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
# Define some colors | |
RED="\[\e[0;38;5;196m\]" | |
GREEN="\[\e[01;32m\]" | |
BLUE="\[\e[01;34m\]" | |
WHITE="\[\e[37;1m\]" | |
LIGHT_BLUE="\[\e[36m\]" | |
PURPLE="\[\e[35m\]" | |
NIL="\[\e[m\]" | |
function git_branch(){ |
This file contains hidden or 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
# Install tpm + plugins with: | |
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm | |
# trigger plugin install with: prefix + I | |
# trigger plugin update with: prefix + U | |
# List of plugins | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-yank' | |
set -g @plugin 'laktak/extrakto' |
This file contains hidden or 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 | |
# Problem: if there is an ad you will be muted, no matter of what. You need to | |
# stop this script to avoid that. | |
set -euo pipefail | |
IFS=$'\n\t' | |
source volume.sh | |
get_systray_title(){ |
This file contains hidden or 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
#!/usr/bin/env bash | |
progress(){ | |
# example usage: | |
# progress 30G 9G 30 | |
# 30G [================>.................................] 30% (9G) | |
# params: | |
# $1 = total value (e.g.: source size) | |
# $2 = current value (e.g.: destination size) |
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
from PySide import QtCore, QtGui | |
class Foo(QtGui.QWidget): | |
some_signal_1 = QtCore.Signal(str) |
This file contains hidden or 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
#!/usr/bin/env python | |
# encoding: utf-8 | |
# I was getting different results on json.loads() depending if I was using | |
# stdlib's json or simplejson. So after a little research I reached a | |
# conclusion: | |
# `simplejson` optimizes(*) the `loads` and returns `str` when is possible, | |
# otherwise it returns `unicode`. | |
# stdlib's `json`'s `loads` returns always `unicode`. |
This file contains hidden or 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
#!/usr/bin/env python | |
# encoding: utf-8 | |
# Copyright (c) 2014, Ivan Alejandro | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# | |
# 1. Redistributions of source code must retain the above copyright notice, |
This file contains hidden or 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
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
A Finite State Machine for the EIP service, based on | |
https://leap.se/code/issues/5616#note-2 | |
""" | |
import random | |
from pprint import pprint | |
# see: http://xworkflows.readthedocs.org/en/latest/reference.html |
OlderNewer