Skip to content

Instantly share code, notes, and snippets.

💻
Work work

Wojtek Siudzinski suda

💻
Work work
Block or report user

Report or block suda

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View settings.py
"""
Here's my sample Django settings for a project I recently did. Visit http://damonjablons.wordpress.com to see the explanation.
"""
import os
import socket
# Set DEBUG = True if on the production server
if socket.gethostname() == 'your.domain.com':
DEBUG = False
View DNCloseButton.h
//
// 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>
@3dd13
3dd13 / generate_ssh_keys.rb
Created Jan 20, 2011
chef recipe to generate ssh key for a user
View generate_ssh_keys.rb
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"
@nvkv
nvkv / uncrustify.cfg
Created May 4, 2011
Nulana's Uncrustify config for Objective-C/C++
View uncrustify.cfg
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
@pjkix
pjkix / css-stats-ack.sh
Created Oct 5, 2011
shell script to generate some css file statistics
View css-stats-ack.sh
#!/bin/bash
## v1.0.6
## this script will gernerate css stats
### example output
# CSS STATS
# ----------
# Floats: 132
@Jaybles
Jaybles / UIDeviceHardware.h
Created Oct 28, 2011
UIDeviceHardware - Determine iOS device being used
View UIDeviceHardware.h
//
// UIDeviceHardware.h
//
// Used to determine EXACT version of device software is running on.
#import <Foundation/Foundation.h>
@interface UIDeviceHardware : NSObject
- (NSString *) platform;
@allanlei
allanlei / .env
Created Jan 16, 2012
Sample local Heroku/Django development environment using foreman
View .env
DATABASE_URL=postgres://USERNAME:PASSWORD@127.0.0.1/DATABASE
MEMCACHE_SERVERS=127.0.0.1:11211
DJANGO_SETTINGS_MODULE=settings.development.local
@armornick
armornick / playwav.c
Created Aug 24, 2012
Play a sound with SDL2 (no SDL_Mixer)
View playwav.c
#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
@arriolac
arriolac / TopCropImageView.java
Last active Nov 17, 2019
Custom Android ImageView for top-crop scaling of the contained drawable.
View TopCropImageView.java
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.
@nebiros
nebiros / postgresql.rb
Created Dec 3, 2012
postgres 9.1.6 homebrew formula
View postgresql.rb
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'
You can’t perform that action at this time.