Skip to content

Instantly share code, notes, and snippets.

@stchris
stchris / getimg.py
Created February 19, 2011 13:34
Improved version of getimg.sh - gets the 'image of the day' from NASA, writes the summary onto the image and sets it as the Gnome wallpaper.
#!/usr/bin/env python
"""
getimg.py
Gets the current image of the day from NASA and sets it as the
background in Gnome. The summary / description text is written
to the image.
Requires:
PIL (apt-get install python-imaging or pip install PIL)
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 24, 2024 17:56
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jakzal
jakzal / .gvimrc.local
Last active February 7, 2018 17:16
My configuration for spf13-vim distribution
set guifont=Monaco:h16
set transparency=0
@allolex
allolex / damons_mutt_configuration.md
Last active August 30, 2018 12:16
Mutt with multiple IMAP (Google Mail) accounts in the cloud. This is how I have my mutt installation set up and configured. I primarily use Google products for my mail these days, so the config here should be just fine for that. The principle shown here holds true for all mail accounts.

Mutt for multiple email accounts

This is an OS X-centric configuration.

My setup and configuration for Gmail/Google Apps

The idea here is to use environment variables, loaded via aliases to mutt, to control which account you're loading. Years ago I had all of my accounts configured to be accessible from a single mutt

@mdrmike
mdrmike / post-receive
Last active April 19, 2016 18:51
post-recieve hook to automatically deploy a git branch to either staging or production. (or do nothing)
#!/bin/bash
# git/hooks/post-receive
# add this script to a git repo on a 'remote' server
# to automatically deploy a git branch to either staging or production (or do nothing)
WORK_TREE_PROD=$HOME/production # assumes logged in user HOME/production path is webroot
WORK_TREE_STAGE=$HOME/staging # assumes logged in user HOME/staging path is webroot
GIT_DIR=$HOME/git # assumes remote git repo is in HOME/git (no dot - not hidden)
@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active July 25, 2024 08:41
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@brianlmoon
brianlmoon / apache_cors_example
Last active November 19, 2023 03:14
CORS example for Apache with multiple domains
# Sets CORS headers for request from example1.com and example2.com pages
# for both SSL and non-SSL
SetEnvIf Origin "^https?://[^/]*(example1|example2)\.com$" ORIGIN=$0
Header set Access-Control-Allow-Origin %{ORIGIN}e env=ORIGIN
Header set Access-Control-Allow-Credentials "true" env=ORIGIN
# Always set Vary: Origin when it's possible you may send CORS headers
Header merge Vary Origin
@JeffPaine
JeffPaine / i3-cheat-sheet.md
Last active July 10, 2024 12:38
i3 Window Manager Cheat Sheet

i3 Window Manager Cheat Sheet

$mod refers to the modifier key (alt by default)

General

  • startx i3 start i3 from command line
  • $mod+<Enter> open a terminal
  • $mod+d open dmenu (text based program launcher)
  • $mod+r resize mode ( or to leave resize mode)
  • $mod+shift+e exit i3