Skip to content

Instantly share code, notes, and snippets.

@dr-dimitru
dr-dimitru / Social RESTful URLs snippet.md
Last active January 28, 2023 03:57
Social links, +1s and shares using only HTML (no JS)
@toddmotto
toddmotto / gist:6596373
Created September 17, 2013 15:56
Disable Web Security in Chrome Canary to make cross-domain XHR requests (local servers obvs).
open -a Google\ Chrome\ Canary --args --disable-web-security
@james2doyle
james2doyle / cheatsheet-markdown.md
Last active May 22, 2024 11:09
a markdown cheatsheet showing all the elements and syntax. Stolen from the Mou.app for OSX http://mouapp.com/

Mou

Mou icon

Overview

Mou, the missing Markdown editor for web developers.

Syntax

@nicolashery
nicolashery / solarized-dark.css
Last active October 9, 2025 17:55 — forked from scotu/solarized.css
Solarized theme stylesheets for Jekyll and Pygments
/* Solarized Dark
For use with Jekyll and Pygments
http://ethanschoonover.com/solarized
SOLARIZED HEX ROLE
--------- -------- ------------------------------------------
base03 #002b36 background
base01 #586e75 comments / secondary content
@stoikerty
stoikerty / dabblet.css
Created March 24, 2013 12:06
draggable iOS-like switch (webkit-only, also works in iOS safari)
/* draggable iOS-like switch (webkit-only, also works in iOS safari) */
/* Don't get your hopes up for using this in anything else besides
* webkittys, ::webkit-slider-thumb is proprietary.
* Here's some more info if you're interested:
* http://davidbcalhoun.com/2011/implementing-iphone-slider-unlock-with-input-type-range
* http://css-tricks.com/almanac/properties/a/appearance/
*/
.switch {
@joostvanveen
joostvanveen / textile_filter.php
Created March 3, 2013 17:47
A pre_replace filter that strip out all characters that are NOT letters or numbers or Textile Markup special characters. You can use this to filter user input. If you have any improvements, let me know!
<?php
/**
* Filter input based on a whitelist. This filter strips out all characters that
* are NOT:
* - letters
* - numbers
* - Textile Markup special characters.
*
* Textile markup special characters are:
@iambibhas
iambibhas / scopes.txt
Last active January 25, 2025 20:07
Sublime Text 2: Snippet scopes
Here is a list of scopes to use in Sublime Text 2 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
CoffeeScript: source.coffee
@tylerpearson
tylerpearson / delay-social-load.coffee
Last active December 10, 2015 15:09
Delay load of social scripts
loadSocialScripts = ->
# Facebook
script = document.createElement('script')
script.async = true;
script.id = 'facebook-jssdk'
script.src = '//connect.facebook.net/en_US/all.js#xfbml=1'
document.body.appendChild(script)
# Twitter
@johnjohndoe
johnjohndoe / download-url-to-file.rb
Last active March 14, 2024 17:58
Ruby script to download a number of files from individual URLs via HTTP/HTTPS/FTP specified in an external file.
#!/usr/bin/env ruby
#
# Ruby script to download a number of files
# from individual URLs via HTTP/HTTPS/FTP
# specified in an external file.
#
# Author: Tobias Preuss
# Revision: 2013-04-18 16:26 +0100 UTC
# License: Creative Commons Attribution-ShareAlike 3.0 Unported
@olasitarska
olasitarska / pgessays.py
Created November 18, 2012 10:11
Builds epub book out of Paul Graham's essays.
# -*- coding: utf-8 -*-
"""
Builds epub book out of Paul Graham's essays: http://paulgraham.com/articles.html
Author: Ola Sitarska <[email protected]>
Copyright: Licensed under the GPL-3 (http://www.gnu.org/licenses/gpl-3.0.html)
This script requires python-epub-library: http://code.google.com/p/python-epub-builder/
"""