Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
echo -e "tell application \"Quicksilver\"\nshow large type \"$1\"\nend tell" | osascript
@philipn
philipn / gist:1138957
Created August 11, 2011 05:25
GeoTIFF metadata / ftp download
"""
This likely isn't useful to anybody else. But it's an example of how to
adapt python's ftplib to grab just the first few kb of a given file.
In this case, all we need is the first few kb to get the metadata from a
GeoTIFF file.
"""
import ftplib
@nrrrdcore
nrrrdcore / border.css
Created May 2, 2012 20:44
Faded/Gradient Borders in Pure CSS
.border-container {
width: 28%; /* border will be on the left on this container */
float: right;
overflow: hidden; /* only needed if floating container */
min-height: 600px; /* static height if you want your container to be taller than its content */
-moz-box-shadow: inset 15px 0 5px -16px rgba(0,0,0,.1), -1px 0 0 #FFF;
-webkit-box-shadow: inset 15px 0 5px -16px rgba(0,0,0,.1), -1px 0 0 #FFF;
box-shadow: inset 15px 0 5px -16px rgba(0,0,0,.1), -1px 0 0 #FFF;
border-width: 0 0 0 1px;
-webkit-border-image:
@nrrrdcore
nrrrdcore / bending-shadow.css
Last active April 22, 2024 20:54
Simple Bended-Shadow CSS: Create the Bended Photo Effect without writing a million divs.
.bended-shadow {
position: relative;
width: 500px;
margin: 200px auto;
}
.bended-shadow::before, .bended-shadow::after {
content: '';
position: absolute;
width: 60%;
@nrrrdcore
nrrrdcore / apple-shadow.css
Created May 17, 2012 17:19
Bending Shadows Backwards: Apple.com's Container CSS Sorcery
.shadow-stuff {
-moz-border-radius: 0% 0% 100% 100% / 0% 0% 8px 8px;
-webkit-border-radius: 0% 0% 100% 100% / 0% 0% 8px 8px;
border-radius: 0% 0% 100% 100% / 0% 0% 8px 8px;
-moz-box-shadow: rgba(0,0,0,.30) 0 2px 3px;
-webkit-box-shadow: rgba(0,0,0,.30) 0 2px 3px;
box-shadow: rgba(0,0,0,.30) 0 2px 3px;
}
.container {
@valpackett
valpackett / Alfred-Pinboard-INSTANT.md
Last active September 7, 2023 21:01
INSTANT Pinboard search from Alfred 2

INSTANT Pinboard search from Alfred 2

I've had a Python script that makes an HTML Bookmarks file for LaunchBar.
Now that I use Alfred 2, I modified it to make XML for Alfred.
This allows me to search my bookmarks with GREP SPEED!

Installation

First, add your token (from pinboard.in/settings/password) to ~/.netrc

@didlix
didlix / multimarkdown.patch
Created March 20, 2013 16:05
Jekyll patched to have multimarkdown support
diff --git a/lib/jekyll.rb b/lib/jekyll.rb
index b0401b9..26936e6 100644
--- a/lib/jekyll.rb
+++ b/lib/jekyll.rb
@@ -66,7 +66,7 @@ module Jekyll
'future' => true, # remove and make true just default
'pygments' => true, # remove and make true just default
- 'markdown' => 'maruku',
+ 'markdown' => 'multimarkdown',
@phs
phs / gist:5693053
Created June 2, 2013 08:43
Applescript to open up the app store and search for Xcode
tell application "App Store"
activate
delay 5 -- wait for it to start
end tell
tell application "System Events"
tell window "App Store" of process "App Store"
-- Search for Xcode
tell text field 1 of group 7 of tool bar 1
@davewalk
davewalk / gist:5893611
Last active June 15, 2018 18:58
Using Stamen map tiles in Leaflet without loading the tile.stamen.js file
var tonerUrl = "http://{S}tile.stamen.com/toner/{Z}/{X}/{Y}.png";
var url = tonerUrl.replace(/({[A-Z]})/g, function(s) {
return s.toLowerCase();
});
var basemap = L.tileLayer(url, {
subdomains: ['','a.','b.','c.','d.'],
minZoom: 0,
maxZoom: 20,
@toolmantim
toolmantim / Makefile
Last active August 21, 2024 20:56
An example of using Make instead of Grunt for fast, simple and maintainable front-end asset compilation.
# A simple Makefile alternative to using Grunt for your static asset compilation
#
## Usage
#
# $ npm install
#
# And then you can run various commands:
#
# $ make # compile files that need compiling
# $ make clean all # remove target files and recompile from scratch