- BBEdit
- Vim
- Emacs
- TextMate
- SubEthaEdit
/* ===================================== */ | |
/* = Some less.js mixins from Nutshell = */ | |
/* ===================================== */ | |
.rounded-corners (@radius: 5px) { | |
border-radius: @radius; | |
-moz-border-radius: @radius; | |
-webkit-border-radius: @radius; | |
} | |
.drop-shadow (@x:0, @y:1px, @feather:1px, @color:#fff) { |
# need to fix a corrupted repo because I have a local branch I need to recover | |
# first, backup the corrupted git repo | |
# get a fresh clone | |
$ git clone git://mydomain.local/awesomerepo.git; cd awesomerepo | |
$ mv .git/objects/pack/*.pack /tmp/. | |
$ git unpack-objects < /tmp/*.pack # unpack all the git objects. | |
# you need to move the pack file out of the | |
# git repo. See git-unpack-objects's man page: |
#!/usr/bin/env ruby | |
# Walks up and down revisions in a git repo. | |
# Usage: | |
# git walk next | |
# git walk prev | |
case ARGV[0] | |
when "next" | |
rev_list = `git rev-list --children --all` | |
refs = rev_list.scan(/[a-z0-9]{40}(?= )/) | |
refs.unshift(rev_list[/[a-z0-9]{40}/]) |
Your API does REST, but can it SLEEP?
SLEEP (Syncable Lightweight Event Emitting Persistence) is an emerging standard for distributed data sync using HTTP and JSON. A generalized version of CouchDB's much lauded built-in replication, SLEEP extends the REST architecture to define a way in which databases can offer syncable JSON APIs that foster open data innovation by allowing developers to replicate entire databases over the net.
SLEEP comes from the Apache CouchDB project which is now widely known for it's multi-master streaming HTTP + JSON replication. This is possible in part because of the CouchDB _changes feed, which is a particular API that lets you see if there have been any changes made to the database since last time you synchronized. CouchDB can efficiently implement the _changes feed because of one subtle difference between it and most other databases: it stores a history of all changes that happen to the database, including deletes.
If you synchronize data from a remote source and then the
// Define your table view's sections | |
typedef enum { | |
kTitleSection = 0, | |
kGoalSection, | |
kNumberOfSections | |
} NESTemplateEditTableSections; | |
// Make configuration arrays indexed against table sections. | |
// It's safe to reorder the original enum! | |
static NSString * const kCellIdentifiers[kNumberOfSections] = { |
#import <SenTestingKit/SenTestingKit.h> | |
#import "OCMock.h" | |
#import "NLPageControlScrollViewHelper.h" | |
#pragma mark - Tests | |
@interface NLPageControlScrollViewHelperTests : SenTestCase | |
@end |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
#!/bin/bash | |
echo "Generating an SSL private key to sign your certificate..." | |
openssl genrsa -des3 -out myssl.key 1024 | |
echo "Generating a Certificate Signing Request..." | |
openssl req -new -key myssl.key -out myssl.csr | |
echo "Removing passphrase from key (for nginx)..." | |
cp myssl.key myssl.key.org | |
openssl rsa -in myssl.key.org -out myssl.key |