This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resizeCanvas = function (largerOrSmaller){ | |
scaleValue = (largerOrSmaller == "larger") ? 0.1 : -0.1 | |
$('#canvasHolder').css({ scale: ($('#canvasHolder').css('scale') + scaleValue) }); | |
offset = $("#canvasHolder").offset() | |
if (largerOrSmaller == "larger") | |
if (offset.top > 0 && offset.left > 0) | |
resizeCanvas("larger") | |
else | |
$('#canvasHolder').css({ scale: ($('#canvasHolder').css('scale') - scaleValue) }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Retrieving application files from cloud to put in local database:" | |
printf '%s\n%s\n' `echo " | |
require 'rubygems' | |
require 'couchrest' | |
cloud_db_url = 'http://example.org/zanzibar' | |
local_db_url = 'http://localhost:5984/zanzibar' | |
@cloud_db = CouchRest.database(cloud_db_url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.couch.db("tangerine").view "tangerine/results", | |
include_docs: true | |
success: (result) -> | |
docs = for row in result.rows | |
row.doc | |
$.couch.db("tangerine").bulkRemove {docs: docs}, | |
success: (result) -> | |
console.log result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# usage: | |
# post.rb <live_form_url> arg1 arg2 arg3 ... | |
require "rest-client" | |
live_form_url = ARGV.shift | |
post_form_url = live_form_url.gsub(/viewform/,"formResponse") | |
params = RestClient.get(live_form_url).scan(/(entry\.\d+)/).flatten |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for dir in tests/*; do \ | |
(cd "$dir" && make) \ | |
done | |
make[1]: Entering directory `/var/www/muvuku/tests/charset' | |
avr-gcc -c -D_MUVUKU_TINY_STRINGS -Os -Wall -fno-strict-aliasing -fomit-frame-pointer -std=gnu99 -mmcu=atmega128 -fno-jump-tables -Wimplicit-function-declaration -fno-builtin -I../../../turbo-devel-1.5.24/include -I../../src -I. charset.c -o charset.o | |
charset.c:11:17: error: variable ‘lc_test_str’ must be const in order to be put into read-only section by means of ‘__attribute__((progmem))’ | |
charset.c:30:19: error: variable ‘l_test’ must be const in order to be put into read-only section by means of ‘__attribute__((progmem))’ | |
charset.c:41:17: error: variable ‘lc_topmenu_name’ must be const in order to be put into read-only section by means of ‘__attribute__((progmem))’ | |
charset.c:47:17: error: variable ‘lc_menu_top’ must be const in order to be put into read-only section by means of ‘__attribute__((progmem))’ | |
charset.c:52:17: error: variable ‘lc_select_str’ must be const in order to be put |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'sinatra' | |
require 'rest-client' | |
require 'cgi' | |
set :port, 9494 | |
get '/' do | |
"<form action='/send'> | |
<input id='phone' name='phone' type='text'></input> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@$el.html " | |
Value used for grouping: | |
<select id='groupBy'> | |
#{ | |
_.map propertiesToGroupBy, (value,key) -> | |
"<option #{if key is groupBy then "selected='true'" else ''}> | |
#{key} | |
</option>" | |
} | |
</select> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header('Access-Control-Allow-Origin: *'); | |
header('Access-Control-Allow-Methods: POST, GET, OPTIONS'); | |
header('Access-Control-Max-Age: 1000'); | |
header('Access-Control-Allow-Headers: Content-Type'); | |
var_dump($_POST) | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header('Access-Control-Allow-Origin: *'); | |
header('Access-Control-Allow-Methods: POST, GET, OPTIONS'); | |
header('Access-Control-Max-Age: 1000'); | |
header('Access-Control-Allow-Headers: Content-Type'); | |
var_dump($_POST) | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ubuntu 10.04 | |
#Setup android SDK | |
sudo apt-get install openjdk-6-jdk ant1.8 wget | |
wget http://dl.google.com/android/android-sdk_r16-linux.tgz | |
tar -xvzf android-sdk_r16-linux.tgz | |
cd android-sdk-linux/tools | |
./android update sdk --no-ui --filter platform-tool | |
./android update sdk --no-ui --filter 9 |