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/sh | |
# | |
# wrote this snippet to see all my applications and shortcuts in Synapse, the launcher I'm using | |
FILES=/usr/share/applications/*.desktop | |
for f in $FILES | |
do | |
echo 'removing OnlyShowIn from' $f | |
sed --in-place '/OnlyShowIn/d' $f | |
done |
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
#include <iostream> | |
class Owner | |
{ | |
public: | |
class PublicInterface | |
{ | |
public: | |
int publicVariable; |
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/sh | |
# in ubuntu 14.10, using the synapse/testin PPA synapse crashes | |
# a workaround is to set the GTK_IM_MODULE envvar to nothing at the first start | |
# this script does it, or invokes the already running instance, if there is any | |
pidof synapse | |
if [ $? -eq 0 ] | |
then |
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
# so it does not wrap | |
git config --global core.pager 'less -S' | |
# graphical git log with some settings | |
git log --graph --full-history --all --color --date=relative --pretty=format:"%x09%C(yellow)%h%C(auto)%d %C(magenta)(%ad) %C(blue)<%an>%n%x09%x09%s" |
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
<html> | |
<head> | |
<title>BG check - b&w check pattern</title> | |
<style> | |
html { | |
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAAAAABX3VL4AAAADElEQVQI12Ng+A+EAAYAAf9C8vvWAAAAAElFTkSuQmCC); | |
} | |
</style> | |
</head> | |
<body> |
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 | |
TRACKS=$(curl -v --silent ${1} 2>/dev/null | grep ".mp3\">Download" | sed -e 's/.*href=\"\(.*\)\">Download.*/\1/') | |
for TRACK in ${TRACKS}; do | |
URL=$(curl -v --silent ${TRACK} 2>/dev/null | grep "Click here" | sed -e 's/.*href=\"\(.*\)\">Click.*/\1/') | |
wget ${URL} | |
done |
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
# small convenience function to notify when a long running command finishes | |
# | |
# usage: | |
# shout [full command with arguments and whatnot] | |
# | |
# eg. shout sudo apt update | |
# | |
function shout { |
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
[ v.settings().erase("color_scheme") for views in [ w.views() for w in sublime.windows() ] for v in views ] |
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 | |
# | |
# SIMPLE FILESYSTEM BOOKMARK MANAGEMENT | |
# | |
# usage: | |
# - create a bookmark for your current working directory with `bkmrk $NAME` | |
# - cd to any of your bookmarks with `jump $NAME` | |
# - list your bookmarks and their destinations with `lsbkmrks` |
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
RESET='\[\033[0m\]' | |
RED='\[\033[00;31m\]' | |
GREEN='\[\033[00;32m\]' | |
YELLOW='\[\033[00;33m\]' | |
BLUE='\[\033[00;34m\]' | |
PURPLE='\[\033[00;35m\]' | |
CYAN='\[\033[00;36m\]' | |
LIGHTGRAY='\[\033[00;37m\]' |
OlderNewer