Skip to content

Instantly share code, notes, and snippets.

View dasgib's full-sized avatar

Dominik Weiss dasgib

View GitHub Profile
@dasgib
dasgib / userChrome.css for FF4 OSX
Created March 23, 2011 12:28
~/Library/Application Support/Firefox/Profiles/xxxxxxx.default/chrome/userChrome.css
/* Tab Arrangement */
.tab-close-button { -moz-box-ordinal-group: 1 !important;}
.tab-text { -moz-box-ordinal-group: 2 !important;}
.tab-throbber { -moz-box-ordinal-group: 3 !important;}
.tab-icon-image { -moz-box-ordinal-group: 4;}
.tabbrowser-tab[pinned] .tab-icon-image {
visibility: visible !important;
}
@dasgib
dasgib / userChrome.css
Created March 23, 2011 12:40
Hides the star-icon from Firefox 3/4 addressbar
/* hide star icon in address bar */
#star-button { display: none !important }
@dasgib
dasgib / dasgib.zsh-theme
Created December 19, 2011 13:01
My zsh Theme
PROMPT='%{$fg[white]%} %{$fg[green]%}%2~ %{$fg[grey]%}$(git_prompt_info)%{$fg[yellow]%}→ %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX=""
ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}●%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_CLEAN=" "
@dasgib
dasgib / .zshrc
Created December 20, 2011 10:40
pathed_cd for zsh - start new shell in last used directory
pathed_cd () {
if [ x"$1" = x ]; then
cd
else
cd "$1"
fi
pwd > ~/.cdpath
}
@dasgib
dasgib / svg2png
Created June 23, 2012 14:16
Use Imagemagick to convert .SVG to .PNG
#!/bin/bash
if [ -z "$1" ] || [ -z "$3" ] || [ -z "$3" ]
then
echo "Syntax: svg2png <source.svg> <dest.png> <16x16> [<negate>]"
else
if [ -z "$4" ]
then
convert -background none -resize $3 -gravity center -extent $3 $1 $2
else
@dasgib
dasgib / compass-retina-sprites.scss
Created June 23, 2012 19:57 — forked from thulstrup/compass-retina-sprites.scss
Using Compass to generate normal and retina sprite maps
$sprites: sprite-map("sprites/*.png");
$sprites-retina: sprite-map("sprites-retina/*.png");
@mixin sprite-background($name) {
background-image: sprite-url($sprites);
background-position: sprite-position($sprites, $name);
background-repeat: no-repeat;
display: block;
height: image-height(sprite-file($sprites, $name));
width: image-width(sprite-file($sprites, $name));
@dasgib
dasgib / gist:3782943
Created September 25, 2012 16:25
Copy all songs in a .m3u file exported via iTunes to a new directory
IFS=$'\n'; mkdir playlist; for FILE in `tr "\r" "\n" < playlist.m3u | grep -v "^#"`
do
SONG=`basename $FILE`
ALBUM=`basename ${FILE/$SONG//}`
ARTIST=`basename ${FILE/$ALBUM\/$SONG//}`
cp $FILE "./playlist/$ARTIST - $ALBUM - $SONG"
done

Keybase proof

I hereby claim:

  • I am dasgib on github.
  • I am dasgib (https://keybase.io/dasgib) on keybase.
  • I have a public key whose fingerprint is 346D 4B2F D925 3F26 FE79 5A62 E476 C80C E0FC 2E65

To claim this, I am signing this object:

@dasgib
dasgib / todoist.userstyle.css
Last active August 29, 2015 14:00
Userstyle for todoist.com (Non-Premium)
/* hide useless stuff */
#td_logo,
#notifications_counter,
#completed_items {
display: none !important;
}
#top_filters {
padding-top: 0 !important;
@dasgib
dasgib / todoist.userscript.js
Created April 30, 2014 12:55
Userscript for todoist.com (Non-Premium)
window.onload = function() {
// add "overview" button
var filters_list = document.getElementById('top_filters');
var home_filter = document.createElement('li');
home_filter.setAttribute('class', 'filter current');
home_filter.innerHTML = '<img src="https://d3ptyyxy2at9ui.cloudfront.net/76084e29cb2cf72b320e888edc583dfb.gif" width="20" height="18" class="cmp_filter_inbox" style="background-position: -2px -649px">Overview';
home_filter.onclick = function() { document.location.href = 'https://todoist.com' }