Skip to content

Instantly share code, notes, and snippets.

View chucktrukk's full-sized avatar

Charlie Madison chucktrukk

View GitHub Profile
@Oblongmana
Oblongmana / .gitignore-sf
Last active August 4, 2023 08:24
Salesforce development gitignore file. Specific to a Sublime Text/MavensMate/OSX setup, used @TrineoLtd.Works well with this git alias for speeding up repo setup https://gist.github.com/Oblongmana/7145945. Curl with curl -o .gitignore https://gist.github.com/Oblongmana/7130387/raw/69aa9b661b0bd7300eff8648c65362c7f711f725/.gitignore-sf
#OSX-specific exclusions
.[dD][sS]_[sS]tore
#Sublime nature exclusions
*.sublime-workspace
*.sublime-project
#MavensMate nature exclusions
config/*
mm.log
@malarkey
malarkey / Three Wise Monkeys.md
Created December 2, 2012 14:26
Three Wise Monkeys (NDA)

Date: [date]

Between us [company name] and you [customer name].

Summary:

In short; neither of us will share any confidential information about each-other, by any means, with anyone else.

What’s confidential information?

@malarkey
malarkey / Contract Killer 3.md
Last active May 17, 2024 15:28
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@danmatthews
danmatthews / gist:3240064
Created August 2, 2012 19:49
Solution to doing some processing for every method of FuelPHP REST controller.
<?php
class ExampleRestController extends Controller_Rest {
/**
* Make sure the router method has the same method signature as the parent::router declaration.
* @see fuel/core/classes/controller/rest.php
*/
public function router($method, array $params) {
@jotto
jotto / google_oauth2_access_token.rb
Created June 14, 2012 21:15
ruby command line script for generating google oauth2 access token
# (create oauth2 tokens from Google Console)
client_id = ""
client_secret = ""
# (paste the scope of the service you want here)
# e.g.: https://www.googleapis.com/auth/gan
scope = ""
class ActionDispatch::Routing::Mapper
def draw(routes_name)
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb")))
end
end
BCX::Application.routes.draw do
draw :api
draw :account
draw :session
@addyosmani
addyosmani / pubsub.md
Created October 28, 2011 06:49
Four ways to do Pub/Sub with jQuery 1.7 and jQuery UI (in the future)

#Four Ways To Do Pub/Sub With jQuery and jQuery UI (in the future)

Between jQuery 1.7 and some of work going into future versions of jQuery UI, there are a ton of hot new ways for you to get your publish/subscribe on. Here are just four of them, three of which are new.

(PS: If you're unfamiliar with pub/sub, read the guide to it that Julian Aubourg and I wrote here http://msdn.microsoft.com/en-us/scriptjunkie/hh201955.aspx)

##Option 1: Using jQuery 1.7's $.Callbacks() feature:

$.Callbacks are a multi-purpose callbacks list object which can be used as a base layer to build new functionality including simple publish/subscribe systems. We haven't yet released the API documentation for this feature just yet, but for more information on it (including lots of examples), see my post on $.Callbacks() here:

@adamstac
adamstac / TODO
Created February 11, 2011 18:50
A Rubyist’s guide to setting up a Mac OS X development environment using Homebrew, RVM, Git and Bundler
* Review this article and add new steps as needed: http://blog.therubymug.com/blog/2010/05/20/the-install-osx.html
// Build and inject Like button
$('ul.posts a').each(function() {
var fb_url = location.href.split('/')[0] + '//' + location.href.split('/')[2] + $(this).attr('href'),
fb_like = '<div class="fb_recommend"><fb:like href="'+fb_url+'" layout="standard" show_faces="false" action="recommend" colorscheme="light"></fb:like></div>';
$(this).parent().next().after(fb_like);
});
function setFacebookLike() {
$('html').attr("xmlns:og","http://www.facebook.com/2008/fbml").attr("xmlns:fb","http://www.facebook.com/2008/fbml");
// Remove previously created FB like elements -- if they exist -- so they can be re-added after AJAX pagination
$('.fb-recommend').remove();
$('#fb-root').empty();
// Build and inject Like button
$('ul.posts a').each(function() {
var fb_url = location.href.split('/')[0] + '//' + location.href.split('/')[2] + $(this).attr('href'),