Skip to content

Instantly share code, notes, and snippets.

@JeffPaine
JeffPaine / i3-cheat-sheet.md
Last active May 5, 2024 22:39
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
@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
@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active May 4, 2024 16:58
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@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)
@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

@malarkey
malarkey / Contract Killer 3.md
Last active May 8, 2024 16:02
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@jakzal
jakzal / .gvimrc.local
Last active February 7, 2018 17:16
My configuration for spf13-vim distribution
set guifont=Monaco:h16
set transparency=0
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 9, 2024 06:43
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@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)