Skip to content

Instantly share code, notes, and snippets.

@saetia
saetia / gist:1623487
Last active June 4, 2025 08:26
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@johankool
johankool / NSData+Hex.h
Created December 7, 2011 16:26
Get a string representation of your NSData with or without spaces or capitals
//
// NSData+Hex.h
//
// Based on code by AliSoftware
// http://stackoverflow.com/a/7520723/60488
//
#import <Foundation/Foundation.h>
@interface NSData (Hex)
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=4
inherit eutils
DESCRIPTION="fswebcam is a neat and simple webcam app."
HOMEPAGE="http://www.firestorm.cx/fswebcam/"
SRC_URI="http://www.firestorm.cx/fswebcam/files/${P}.tar.gz"
LICENSE="GPL-2"
@jehiah
jehiah / wait_run_in_parallel.sh
Created July 22, 2011 16:05
run bash commands in parallel
# This is a simple way to run multiple things in parallel in a bash
# script without making things too complicated
# it's modeled after (and uses) the bash `wait` command
# TIP: to do more complicated steps in parallel put them in a function
function wait_run_in_parallel()
{
local number_to_run_concurrently=$1
if [ `jobs -np | wc -l` -gt $number_to_run_concurrently ]; then
wait `jobs -np | head -1` # wait for the oldest one to finish
@weakish
weakish / backup-providers.md
Last active August 30, 2024 09:57
reviews of vps, storage, mail forward
@docteurklein
docteurklein / silex_app.php
Created April 8, 2011 16:19
a little silex app to show doctrineExtension capabilities
<?php
require_once __DIR__.'/../Silex/silex.phar';
use Silex\Extension\DoctrineExtension;
$app = new Silex\Application;
$app->register(new DoctrineExtension, array(
'doctrine.dbal.connection_options' => array(
@nichtich
nichtich / README.txt
Created June 8, 2010 11:50
Simple PDF file indexing with Solr
This gist contains two files for simple indexing of PDF files.
== requirements ==
First you need to install Solr (which requires a Java JDK): Download a tar or zipfile at http://www.apache.org/dyn/closer.cgi/lucene/solr/ and unpack it to a directory of your choice. Go into this directory and start solr running in jetty by:
$ cd example
$ java -jar start.jar
Then locate your browser to http://localhost:8983/solr/