Skip to content

Instantly share code, notes, and snippets.

View PelagicDev's full-sized avatar

Jordan Godwin PelagicDev

  • CompanyCam
  • Wilmington, NC
  • 20:42 (UTC -04:00)
  • X @PelagicDev
View GitHub Profile
@uhlenbrock
uhlenbrock / deploy.rb
Created January 25, 2010 21:47
Simple Capistrano recipe for Jekyll
set :application, 'foo'
set :repository, '_site'
set :scm, :none
set :deploy_via, :copy
set :copy_compression, :gzip
set :use_sudo, false
set :host, '127.0.0.1'
role :web, host
role :app, host
@matthutchinson
matthutchinson / fakeout.rake
Created February 10, 2010 16:49
fakeout.rake - a simple/configurable rake task that generates some random fake data for the app (using faker) at various sizes
# a simple/configurable rake task that generates some random fake data for the app (using faker) at various sizes
# NOTE: requires the faker or ffaker gem
# sudo gem install faker - http://faker.rubyforge.org
# OR
# sudo gem install ffaker - http://github.com/EmmanuelOga/ffaker
require 'faker'
class Fakeout
@reu
reu / deploy.rb
Created November 6, 2010 12:41
Capistrano deploy recipe for database configuration
# Bundler Integration
require "bundler/capistrano"
# Application Settings
set :application, "yourapplicationname"
set :user, "serveruser"
set :deploy_to, "/home/#{user}/rails-applications/#{application}"
set :rails_env, "production"
set :use_sudo, false
set :keep_releases, 3
@jiggliemon
jiggliemon / Overlay.Mask.js
Created January 3, 2011 04:34
a simple Overlay class
if(!window.Overlay){
throw new Error('the Class "Overlay" doesn\'t appear to be present');
}
/*
* Overlay Mask
*/
(function($){
var Mask = {
@erichurst
erichurst / database.yml.example mysql2
Created May 9, 2011 02:58
Rails 3 database.yml examples
# MySQL. Versions 4.1 and 5.0 are recommended.
#
# Install the MySQL driver:
# gem install mysql2
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql2
encoding: utf8
@oodavid
oodavid / README.md
Last active June 12, 2024 00:28 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@michaek
michaek / .bash_aliases
Last active December 3, 2015 07:05
Bash Aliases
# here
alias vba='vim ~/.bash_aliases'
alias mba='mate ~/.bash_aliases'
alias sba='subl ~/.bash_aliases'
alias ba='source ~/.bash_aliases'
# profile
alias sbp='subl ~/.bash_profile'
alias bp='source ~/.bash_profile'
# bundle
alias bu='bundle'
@sarukuku
sarukuku / dabblet.css
Created April 21, 2012 17:57
Image with an on hover fade in-out caption.
/**
* Image with an on hover fade in-out caption.
*/
@import url(http://fonts.googleapis.com/css?family=Oswald);
/**
* Natural box-model
*/
@jeffjohnson9046
jeffjohnson9046 / ruby-ldap-sample.rb
Last active January 5, 2024 07:11
Some VERY basic LDAP interaction in Ruby using Net::LDAP.
#######################################################################################################################
# This Gist is some crib notes/tests/practice/whatever for talking to Active Directory via LDAP. The (surprisingly
# helpful) documentation for Net::LDAP can be found here: http://net-ldap.rubyforge.org/Net/LDAP.html
#######################################################################################################################
require 'rubygems'
require 'net/ldap'
#######################################################################################################################
# HELPER/UTILITY METHOD
@Agowan
Agowan / album_form.rb
Last active April 5, 2016 20:50
A simple way to use has_many between form objects using Virtus.The problem I had was to get validations working with fields_for in the view, but still have the flexibility and full control using virtus instead of active record models.And I added a way of checking for sanitised args in rails 4.
# encoding: utf-8
class AlbumForm < BaseForm
has_many :songs, class_name: 'SongForm'
validates :songs, form_collection: true
end