Skip to content

Instantly share code, notes, and snippets.

View suda's full-sized avatar
🍃

Wojtek Siudzinski suda

🍃
View GitHub Profile
@matthiasplappert
matthiasplappert / gist:9493050
Last active August 29, 2015 13:57
QuickLook Debugging for `UIView`
@interface UIView (MPAdditions)
@end
@implementation UIView (MPAdditions)
- (id)debugQuickLookObject {
if (self.bounds.size.width < 0.0f || self.bounds.size.height < 0.0f) {
return nil;
}
@dmiddlecamp
dmiddlecamp / holiday_strip.ino
Last active August 29, 2015 14:11
Holiday Strip code
// This #include statement was automatically added by the Spark IDE.
#include "neopixel/neopixel.h"
// IMPORTANT: Set pixel COUNT, PIN and TYPE
#define PIXEL_PIN D2
#define PIXEL_COUNT 300
#define PIXEL_TYPE WS2812B
int reds[PIXEL_COUNT];
int greens[PIXEL_COUNT];
//
// DNCloseButton.h
// ParkingMobility
//
// Created by Michael Nachbaur on 10-08-22.
// Copyright 2010 Decaf Ninja Software. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
@nebiros
nebiros / postgresql.rb
Created December 3, 2012 17:42
postgres 9.1.6 homebrew formula
require 'formula'
class Postgresql < Formula
homepage 'http://www.postgresql.org/'
url 'http://ftp.postgresql.org/pub/source/v9.1.6/postgresql-9.1.6.tar.bz2'
sha1 'a24b7c002463572ee7371f055e566b69e39cda3e'
depends_on 'readline'
depends_on 'libxml2' if MacOS.leopard? # Leopard libxml is too old
depends_on 'ossp-uuid' unless build.include? 'without-ossp-uuid'
@mstepniowski
mstepniowski / results.txt
Last active December 10, 2015 22:31
Script showing top 25 talk proposals for DjangoCon Europe 2013
# 25 best talk proposals as of Saturday, 19th of January at 11:59 PM UTC
# ----------------------------------------------------------------------
# Calculated by votes.py from 15383 votes of 790 people.
1. (411) Asynchronous code in Django.
2. (398) How to combine JavaScript & Django in a smart way
3. (375) Website security in Django
4. (364) Advanced PostgreSQL in Django
5. (359) Designing a good API: Lessons Learned
6. (344) Let’s bankrupt Heroku: make your Django run fast
@emachnic
emachnic / fstab
Created August 26, 2013 13:01
Automatically mount Apple Extreme hard drive in Raspberry PI running XBian using fstab.
#/etc/fstab
//10.0.1.1/My\040Passport\040for\040Mac /media/Passport cifs rw,username=xbian,pass=********,sec=ntlm 0 0
@dre1080
dre1080 / all2coffee.sh
Created November 9, 2013 01:25
Js2Coffee a directory recursively. Excludes node_modules, app/assets and public directories.
for FILE in `find . -name "*.js" -type f -o -path './node_modules' -prune -o -path './app/assets' -prune -o -path './public' -prune`
do
if [ -e $FILE ] ; then
COFFEE=${FILE//.js/.coffee}
echo "converting ${FILE} to ${COFFEE}"
js2coffee "$FILE" > "$COFFEE"
else
echo "File: {$1} does not exist!"
fi
@allanlei
allanlei / .env
Created January 16, 2012 21:14
Sample local Heroku/Django development environment using foreman
DATABASE_URL=postgres://USERNAME:PASSWORD@127.0.0.1/DATABASE
MEMCACHE_SERVERS=127.0.0.1:11211
DJANGO_SETTINGS_MODULE=settings.development.local
#!/usr/bin/env knife exec
# A knife exec script to change chef node's name, preserving all the attributes.
#
# Usage: knife exec rename-node.rb old-name new-name
#
# Script retrieves the Node object, changes its 'name' attribute,
# creates new Node object with updated name and rest of attributes
# untouched. Then it deletes old Node and Client objects from
# database, and logs into the server to update it:
@nvkv
nvkv / uncrustify.cfg
Created May 4, 2011 09:08
Nulana's Uncrustify config for Objective-C/C++
indent_align_string=false
indent_braces=false
indent_braces_no_func=false
indent_brace_parent=false
indent_namespace=false
indent_extern=false
indent_class=false
indent_class_colon=false
indent_else_if=false
indent_func_call_param=false