Skip to content

Instantly share code, notes, and snippets.

@zoul
zoul / Foo.h
Created January 5, 2011 14:24
Synthesized properties in Objective-C without instance variables
@interface Foo : NSObject {}
@property(assign) float foo;
@end
@snuggs
snuggs / .tmux.conf
Last active February 7, 2023 13:51
IDE & TMUX Configuration
############################################################################
# _
# | |_ _ __ ___ _ ___ __
# | __| '_ ` _ \| | | \ \/ /
# | |_| | | | | | |_| |> <
# \__|_| |_| |_|\__,_/_/\_\
#
# Cheatsheets:
# https://devhints.io/tmux
# `property not found` issue:
@paulirish
paulirish / data-markdown.user.js
Last active February 6, 2024 10:41
*[data-markdown] - use markdown, sometimes, in your HTML
// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/>
// @link http://git.io/data-markdown
// @match *
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.
@JoshuaEstes
JoshuaEstes / mysqldump.sh
Created May 29, 2012 14:43
mysql dump snippet, will output a sql file with the date and time of the dump
mysqldump -u USERNAME -p DATABASE_NAME > $(date +"%m-%d-%y_%H-%M%p").sql
@mbostock
mbostock / .block
Last active March 1, 2024 06:07
The Gist to Clone All Gists
license: gpl-3.0
@ozh
ozh / gist:4154909
Created November 27, 2012 15:41
Git trick: have a branch mirror another one

Git post-commit hook to keep master and gh-pages branch in sync :

In your Git repository create a file .git/hooks/post-commit and fill it with this:

#!/bin/sh
git checkout gh-pages
git rebase master
git checkout master
@beshkenadze
beshkenadze / 1_netatalk-3-install-on-debian-7
Last active October 13, 2015 13:38 — forked from vena/gist:2856490
Netatalk 3 installation procedure (Ubuntu 12.04.2 LTS/Debian 7)
$ tar xvf netatalk-3.0.5.tar.bz2
$ cd netatalk-3.0.5
$ ./configure \
--with-init-style=debian \
--with-cracklib \
--without-libevent \
--with-pam-confdir=/etc/pam.d \
--with-dbus-sysconf-dir=/etc/dbus-1/system.d
$ checkinstall --pkgname=netatalk-3.x --pkgversion="$(date +%Y%m%d%H%M)" --backup=no --deldoc=yes --default --fstrans=no
@angel333
angel333 / DWM-ON-OS-X.md
Last active April 11, 2024 16:14 — forked from vangberg/DWM-ON-OS-X.md
Updated for .xinitrc.d and $USERWM, simplified

Installing and configuring dwm on OS X (tested on Mountain Lion, Mavericks)

  1. Install XQuartz.

  2. Install dwm using Homebrew (or whatever):

    brew install dwm
    
  3. Create a xinitrc.d script for dwm:

@jasonrudolph
jasonrudolph / 00-about-search-api-examples.md
Last active April 30, 2024 19:21
5 entertaining things you can find with the GitHub Search API
@CrookedNumber
CrookedNumber / gist:8856939
Last active September 12, 2022 17:33
How to create Trello Cards from the Command Line (with a ~10 minute set-up)
  1. This is quick and dirty and not terribly maintainable. But it's very useful for creating quick cards from the terminal. Requires familiarity with Trello and a basic understanding of bash.
  2. Log-in to Trello.
  3. Go to: https://trello.com/1/appKey/generate
  4. Make note of your key. Replace any mention of YourTrelloKey with this hash.
  5. Create a token. Go to https://trello.com/1/authorize?key=YourTrelloKey&name=SimpleBASHScript&expiration=never&response_type=token&scope=read,write in your browser and follow directions.
  6. Make note of the token. Replace any mention of YourTrelloToken with this looong hash.
  7. Pick a reasonable number of the most popular boards you use. Grab the URLs of those boards. At the same time, think of short, one-word, easy-to-remember names for each board (e.g., work, homeprojects, wedding).
  8. Grab the board IDs of the boards you chose. It'll be the ~8 character hash-like string in the URL. E.g., for https://trello.com/b/aWsGTrsD/work the ID is aWsGTrsD
  9. One by one, plug thos