Skip to content

Instantly share code, notes, and snippets.

Avatar

David Mead daveygm

View GitHub Profile
@sklppr
sklppr / markdown2html.rb
Last active Dec 30, 2015 — forked from brentsimmons/generate_html.rb
Batch conversion of Markdown to HTML.
View markdown2html.rb
#!/usr/bin/env ruby
require "fileutils"
require "redcarpet"
OUTPUT_FOLDER = "html"
HTML_TEMPLATE = <<-HTML
<!DOCTYPE html>
<html>
@shazron
shazron / ios7.phonegap.cordova.js
Last active Dec 23, 2015
PhoneGap / Apache Cordova - top margin for iOS 7
View ios7.phonegap.cordova.js
// Pre-requisites:
// 1. Device core plugin
// 2. Splashscreen core plugin (3.1.0)
// 3. config.xml: <preference name="AutoHideSplashScreen" value="false" />
// 4. config.xml: <preference name="DisallowOverscroll" value="true" />
function onDeviceReady() {
if (parseFloat(window.device.version) >= 7.0) {
document.body.style.marginTop = "20px";
// OR do whatever layout you need here, to expand a navigation bar etc
@erikh
erikh / hack.sh
Created Mar 31, 2012 — forked from DAddYE/hack.sh
OSX For Hackers
View hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@aemkei
aemkei / LICENSE.txt
Last active Jan 19, 2021 — forked from 140bytes/LICENSE.txt
Binary Tetris - 140byt.es
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@JeffreyWay
JeffreyWay / gist:1525217
Created Dec 27, 2011
Instant Server for Current Directory
View gist:1525217
alias server='open http://localhost:8000 && python -m SimpleHTTPServer'
@ryanflorence
ryanflorence / static_server.js
Last active Sep 19, 2020
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
View static_server.js
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
@linuslundahl
linuslundahl / Ignore .DS_Store forever
Created Sep 13, 2010
Make git always ignore .DS_Store
View Ignore .DS_Store forever
$ git config --global core.excludesfile ~/.gitignore
$ echo .DS_Store >> ~/.gitignore