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
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
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
FROM alpine | |
RUN apk add supervisor redis | |
RUN mkdir -p /var/log/supervisor /usr/local/var/db/redis/ | |
COPY config/redis.conf /usr/local/etc/redis/redis.conf | |
COPY config/supervisord.conf /etc/supervisord.conf | |
COPY ./entrypoint.sh /usr/local/bin/ |
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
# List of environments and their heroku git remotes | |
ENVIRONMENTS = { | |
:staging => 'myapp-staging', | |
:production => 'myapp-production' | |
} | |
namespace :deploy do | |
ENVIRONMENTS.keys.each do |env| | |
desc "Deploy to #{env}" | |
task env do |
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 | |
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") | |
buildNumber=$(($buildNumber + 1)) | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE" |
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
NSData *data = [NSKeyedArchiver archivedDataWithRootObject:entry]; | |
NSLog(@"%@", data); | |
NSLog(@"Uncompressed: %d", [data length]); | |
double start; | |
start = [NSDate timeIntervalSinceReferenceDate]; | |
for (int x = 0; x < 50000; x++) { |
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
module Memstat | |
extend self | |
MAC = RUBY_PLATFORM =~ /darwin/ | |
def log | |
"memory=#{real_mem_size} ruby_objects=#{num_objects}" | |
end | |
def real_mem_size |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.beanstalkd</string> | |
<key>KeepAlive</key> | |
<true/> | |
<key>ProgramArguments</key> | |
<array> |
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
class MongoMigrationGenerator < Rails::Generators::NamedBase | |
source_root File.expand_path('../templates', __FILE__) | |
def create_mongo_migration_file | |
version = Time.now.utc.strftime("%Y%m%d%H%M%S") | |
template "migration.rb", "db/mongo_migrations/#{version}_#{file_name}.rb" | |
end | |
end |
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
// Pass a function to profile and optionally the number of times to run | |
function profile(test, times) { | |
var start = new Date().getTime(); | |
if (times === undefined) { | |
times = 100; | |
} | |
for (i = 0; i < times; ++i) { | |
test(); | |
}; |
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
$column_width: 30; | |
$gutter_width: 10; | |
@mixin container($columns) { | |
margin-left: auto; | |
margin-right: auto; | |
width: #{($columns * ($column_width + $gutter_width))}px; | |
} | |
@mixin alpha-column { |
NewerOlder