Skip to content

Instantly share code, notes, and snippets.

@persand
persand / better-skitch-svg-export.html
Last active November 23, 2016 19:26
Better Sketch SVG export with: defaults write com.bohemiancoding.sketch3 exportCompactSVG -bool yes
<!--
Example with:
defaults write com.bohemiancoding.sketch3 exportCompactSVG -bool yes
via: http://robots.thoughtbot.com/organized-workflow-for-svg
-->
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
@willread
willread / minimalAjax.js
Created August 21, 2012 20:20
Minimal cross browser AJAX
var minimalAjax = function(url, callback){
var xmlHTTP = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("MicrosoftXMLHTTP");
xmlHTTP.onreadystatechange = function(){
if(this.readyState == 4 && this.status == 200)
callback(this.responseText);
}
xmlHTTP.open("GET", url, true);
xmlHTTP.send();
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/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
#
@amolk
amolk / remove-rubber-band-web-apps-ios
Last active May 8, 2024 17:47
Remove rubberband scrolling from web apps on mobile safari (iOS)
<!DOCTYPE html>
<html>
<head>
<title>Remove rubberband scrolling from web apps on mobile safari (iOS)</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">
<meta id="extViewportMeta" name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<style>
html, body {margin: 0; padding: 0; overflow: hidden}