latest is a small bash script that fetches the latest version of a JavaScript library from the net and stores it in a local file.
Copy latest
to a directory in your path, e.g. /usr/local/bin
or ~/bin
.
/* iOS Native App Default Style implemented in CSS */ | |
/* Bootstrapping … */ | |
* { | |
margin: 0; | |
padding: 0; | |
font-size: inherit; | |
-webkit-tap-highlight-color: rgba(0,0,0,0); | |
} |
<!doctype html> | |
<html> | |
<head> | |
<style> | |
#theButton, #theTextarea { | |
/* | |
Position the button and the textarea at the exact same | |
position initially. Also make them equally large. | |
*/ |
# install AFP | |
# from: http://ubuntuforums.org/showthread.php?t=410274 | |
mkdir -p ~/src/netatalk | |
cd ~/src/netatalk | |
sudo aptitude install devscripts cracklib2-dev dpkg-dev libssl-dev | |
apt-get source netatalk | |
sudo apt-get build-dep netatalk | |
# this folder name may change depending on the version of netatalk | |
cd netatalk-2.0.5 |
function debugg_multiple(elements, attrs) { | |
if (attrs == undefined) | |
attrs = []; | |
string = ""; | |
for (var i = elements.length - 1; i >= 0; i--){ | |
string = string + debugg(elements[i], attrs) + "<br>"; | |
}; | |
return string; | |
} |
# simple HTTPServer: | |
# useful to test your pages/api calls! | |
class HTTPServer | |
def initialize(port, body) | |
require 'socket' | |
@server = Thread.new do | |
server = TCPServer.open port | |
loop do |
#!/usr/bin/env sh | |
echo "Use current directory as default search scope in Finder" | |
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" | |
echo "Show Path bar in Finder" | |
defaults write com.apple.finder ShowPathbar -bool true | |
echo "Disable the Ping sidebar in iTunes" | |
defaults write com.apple.iTunes disablePingSidebar -bool true |
/** | |
* ping for jQuery | |
* | |
* @auth Jessica | |
* @link http://www.skiyo.cn/demo/jquery.ping/ | |
* | |
*/ | |
(function($) { | |
$.fn.ping = function(options) { | |
var opts = $.extend({}, $.fn.ping.defaults, options); |
var settings = { | |
max_width: 600, | |
max_height: 200 | |
} | |
resize_image = function(img){ | |
var ctx = canvas.getContext("2d") | |
var canvasCopy = document.createElement("canvas") | |
var copyContext = canvasCopy.getContext("2d") |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>title</title> | |
<script src="https://raw.github.com/madrobby/zepto/v0.7/src/zepto.js"></script> | |
<script> | |
$(document).ready(function(){ | |
console.log('READY IN THE HEAD', document.readyState); | |
}); |