Skip to content

Instantly share code, notes, and snippets.

@sparanoid
sparanoid / stacey-on-nginx.conf
Created December 22, 2010 06:08
Runing Stacey on nginx
server {
listen 80;
server_name sparanoid.com www.sparanoid.com;
server_name_in_redirect off;
access_log /srv/www/sparanoid.com/logs/access.log;
error_log /srv/www/sparanoid.com/logs/error.log;
location / {
root /srv/www/sparanoid.com/public_html;
@mikeabdullah
mikeabdullah / gist:867275
Created March 12, 2011 14:35
Log errors to the console before they're presented
- (NSError *)application:(NSApplication *)theApplication
willPresentError:(NSError *)error
{
// Log the error to the console for debugging
NSLog(@"Application will present error:\n%@", [error description]);
return error;
}
@darkseed
darkseed / NSString+Soundex.h
Created October 4, 2011 14:55
Objective-C Soundex
@interface NSString (Soundex)
- (NSString*) soundexString;
- (BOOL) soundsLikeString:(NSString*) aString;
@end
@alextp
alextp / online.py
Created October 22, 2011 00:19
A hacky, old, python implementation of leon bottou's lasvm
# coding: utf-8
"""Online learning."""
import numpy as np
from numpy import sign
import itertools as it
from numpy import array as A, zeros as Z
import math
//
// NSString+Levenshtein.h
// PyHelp
//
// Modified by Michael Bianco on 12/2/11.
// <http://mabblog.com>
//
// Created by Rick Bourner on Sat Aug 09 2003.
// rick@bourner.com
@sekati
sekati / xcode-build-bump.sh
Created July 24, 2012 20:44
Xcode Auto-increment Build & Version Numbers
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
@sqshemet
sqshemet / ObjectMarker.py
Created July 29, 2012 03:00
Python implementation of OpenCV ObjectMarker
#!/usr/bin/python
###############################################################################
# Name : ObjectMarker.py
# Author : Python implementation: sqshemet
# Original ObjectMarker.cpp: http://www.cs.utah.edu/~turcsans/DUC_files/HaarTraining/
# Date : 7/24/12
# Description : Object marker utility to be used with OpenCV Haar training.
# Tested on Ubuntu Linux 10.04 with OpenCV 2.1.0.
# Usage : python ObjectMarker.py outputfile inputdirectory
@moshekaplan
moshekaplan / test_surf.py
Last active October 19, 2022 18:14
Demo for Python OpenCV SURF
#!/usr/bin/env python
'''
Uses SURF to match two images.
Based on the sample code from opencv:
samples/python2/find_obj.py
USAGE
find_obj.py <image1> <image2>
@vigorouscoding
vigorouscoding / DateFlowLayout.h
Created March 13, 2013 20:10
UICollectionView with sticky headers which works for horizontal as well as vertical scrolling
#import <UIKit/UIKit.h>
@interface DateFlowLayout : UICollectionViewFlowLayout
@end
@CoachBirgit
CoachBirgit / divi-sticky-footer.css
Last active January 6, 2018 02:11
CSS: Sticky footer - Elegantthemes Divi