Skip to content

Instantly share code, notes, and snippets.

View cappadona's full-sized avatar

Nick Cappadona cappadona

View GitHub Profile
@barryvdh
barryvdh / gist:2834636
Last active March 7, 2023 23:38
custom grid
/* ===== Primary Styles =====================================================
Author: Fruitcake Studio (Barry vd. Heuvel)
========================================================================== */
//Generate a custom (semantic) grid
.customGrid(@gridColumnWidth, @gridGutterWidth){
#header, #main {
.row();
}
.block {
@timarnold
timarnold / gist:3151932
Created July 20, 2012 17:08
TextExpander Snippet (using AppleScript) to open the currently visible page in Safari in Chrome
property theURL : ""
tell application "Safari"
set theURL to URL of current tab of window 1
end tell
if appIsRunning("Google Chrome") then
tell application "Google Chrome"
make new window
set URL of active tab of window 0 to theURL
activate
end tell
@kmikael
kmikael / README.md
Created July 29, 2012 10:16
Alfred Extensions to create new reminders or notes

Alfred Extensions to create new reminders or notes

OS X Mountain Lion ships with two new apps, Reminders and Notes, which are basically OS X counterparts of the standard iOS apps with the same names. One nice thing about these new apps is that they are scriptable.

This means that I was able to create two simple AppleScripts and thus an Alfred extensions to make a new reminder in the default list and to make a new note in the default folder.

You can view the sources of the AppleScripts below.

Examples

@diethardsteiner
diethardsteiner / index.html
Created August 7, 2012 17:52
Simple D3JS Dashboard
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Testing Pie Chart</title>
<!--<script type="text/javascript" src="d3/d3.v2.js"></script>-->
<script src="http://d3js.org/d3.v2.js"></script>
<!-- Note: I made good use of the sample code provided by the D3JS community and extended it to fit my needs to create this simple dashboard -->
<style type="text/css">
@vicentereig
vicentereig / httpd.conf
Created August 10, 2012 10:20
Apache 2 + Proxy Balancer + Thin + Rails Asset Pipeline Development Environment for MacOSX
# These modules should be loaded by default: proxy_module, proxy_balancer_module, rewrite_module
Listen *:80
# You may want to keep the VirtualHost config under extra/*.conf
# Start your thin
<VirtualHost *:80>
ServerName wwww.yourawesomeapp.dev
@linjunpop
linjunpop / README.md
Created August 21, 2012 01:15
Rails flash messages with AJAX requests
@framallo
framallo / unicorn.rb
Created October 9, 2012 19:47
init upstart script for ubuntu 12.04 and Rails 3 app
app_dir = "/home/public_forums/unstable/"
worker_processes 5
pid "#{app_dir}/tmp/pids/unicorn.pid"
# listen "#{app_dir}/tmp/sockets/public_forum.socket"
listen 5000, :tcp_nopush => true
stderr_path "#{app_dir}/log/unicorn.stderr.log"
stdout_path "#{app_dir}/log/unicorn.stdout.log"
@tiffon
tiffon / Find Results.hidden-tmLanguage
Created December 19, 2012 01:17
Tricked-out Find in Files... results
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Find Results</string>
<key>patterns</key>
<array>
<dict>
@cfitz
cfitz / gist:5265810
Last active December 15, 2015 13:18
quick coffeescript example how to pull bookjacket covers from Google Books in Blacklight. In the views, I added a span with .bookcover and an id of the isbn. AJAX grabs all the .bookcover id's, queries google, which returns JSONP that have all the images url. eh. you don't have to use google...you could just make your own controller that returns…
insertBookCoverImage = (data) ->
for id, values of data
imgId = values.bib_key.toLowerCase().replace(":", "_")
$("##{imgId}").attr("src", values.thumbnail_url)
addBookCovers = (ids) ->
url = "http://books.google.com/books?bibkeys=#{ids}&jscmd=viewapi&callback=?"
$.getJSON url, {}, insertBookCoverImage
@rbazinet
rbazinet / tinyurl.rb
Created June 6, 2013 12:10
Simple Ruby class to shorten URLs using TinyURL.
class Tinyurl
include HTTParty
base_uri 'tinyurl.com'
def shorten(url)
self.class.get("/api-create.php?url=#{url}")
end
end