Skip to content

Instantly share code, notes, and snippets.

View suda's full-sized avatar
🍃

Wojtek Siudzinski suda

🍃
View GitHub Profile
@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
@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'
@arriolac
arriolac / TopCropImageView.java
Last active March 21, 2023 08:01
Custom Android ImageView for top-crop scaling of the contained drawable.
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Matrix;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.util.AttributeSet;
import android.widget.ImageView;
/**
* Created by chris on 7/27/16.
@armornick
armornick / playwav.c
Created August 24, 2012 07:31
Play a sound with SDL2 (no SDL_Mixer)
#include <SDL2/SDL.h>
#define MUS_PATH "Roland-GR-1-Trumpet-C5.wav"
// prototype for our audio callback
// see the implementation for more information
void my_audio_callback(void *userdata, Uint8 *stream, int len);
// variable declarations
static Uint8 *audio_pos; // global pointer to the audio buffer to be played
@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
@Jaybles
Jaybles / UIDeviceHardware.h
Created October 28, 2011 19:33
UIDeviceHardware - Determine iOS device being used
//
// UIDeviceHardware.h
//
// Used to determine EXACT version of device software is running on.
#import <Foundation/Foundation.h>
@interface UIDeviceHardware : NSObject
- (NSString *) platform;
@pjkix
pjkix / css-stats-ack.sh
Created October 5, 2011 21:39
shell script to generate some css file statistics
#!/bin/bash
## v1.0.6
## this script will gernerate css stats
### example output
# CSS STATS
# ----------
# Floats: 132
@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
@3dd13
3dd13 / generate_ssh_keys.rb
Created January 20, 2011 16:59
chef recipe to generate ssh key for a user
define :generate_ssh_keys, :user_account => nil do
username = params[:user_account]
raise ":user_account should be provided." if username.nil?
Chef::Log.debug("generate ssh skys for #{username}.")
execute "generate ssh skys for #{username}." do
user username
creates "/home/#{username}/.ssh/id_rsa.pub"
//
// 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>