This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## v1.0.6 | |
## this script will gernerate css stats | |
### example output | |
# CSS STATS | |
# ---------- | |
# Floats: 132 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UIDeviceHardware.h | |
// | |
// Used to determine EXACT version of device software is running on. | |
#import <Foundation/Foundation.h> | |
@interface UIDeviceHardware : NSObject | |
- (NSString *) platform; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DATABASE_URL=postgres://USERNAME:[email protected]/DATABASE | |
MEMCACHE_SERVERS=127.0.0.1:11211 | |
DJANGO_SETTINGS_MODULE=settings.development.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
OlderNewer