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
/***** | |
To authorize on Twitter API through xAuth, you need HMAC-SHA1 | |
I'm using the following lib for that: | |
http://jssha.sourceforge.net | |
Make sure you have sha.js included! | |
<script src="http://jssha.sourceforge.net/sha.js"></script> | |
Also, you need to email api@twitter.com to get xAuth access | |
I cannot do that for you - see http://dev.twitter.com/pages/xauth | |
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<meta name="viewport" content="width=320; user-scalable=no" /> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>PhoneGap</title> | |
<link rel="stylesheet" href="/master.css" type="text/css" media="screen" title="no title" charset="utf-8"> | |
<script type="text/javascript" charset="utf-8" src="phonegap.js"></script> | |
<script type="text/javascript" src="jquery.1.3.2.min.js"></script> | |
<script type="text/javascript" charset="utf-8"> |
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 | |
function http_get($host) { | |
// create event base | |
$base_fd = event_base_new(); | |
// create a new event | |
$event_fd = event_new(); | |
// resource to be monitored |
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
#!/bin/bash | |
# According to https://developer.apple.com/library/ios/#qa/qa1686/_index.html | |
# Install GraphicsMagick with Homebrew: brew install GraphicsMagick | |
gm convert $1 -resize 512x512 iTunesArtwork.png # Ad Hoc iTunes | |
gm convert $1 -resize 144x144 Icon-72@2x.png # Home screen for "The New iPad" | |
gm convert $1 -resize 114x114 Icon@2x.png # Home screen for Retina display iPhone/iPod | |
gm convert $1 -resize 72x72 Icon-72.png # App Store and Home screen on iPad | |
gm convert $1 -resize 58x58 Icon-Small@2x.png # Spotlight and Settings for Retina display | |
gm convert $1 -resize 57x57 Icon.png # Home screen on non-Retina iPhone/iPod | |
gm convert $1 -resize 50x50 Icon-Small-50.png # Spotlight on iPad 1/2 |
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 bash | |
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite.c | |
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite-blocking.c | |
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite-clast-to-gimple.c | |
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite-dependences.c | |
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite-interchange.c | |
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite-optimize-isl.c | |
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite-poly.c | |
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite-scop-detection.c | |
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite-sese-to-poly.c |
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 | |
/** | |
* SplClassLoader implementation that implements the technical interoperability | |
* standards for PHP 5.3 namespaces and class names. | |
* | |
* http://groups.google.com/group/php-standards/web/final-proposal | |
* | |
* // Example which loads classes for the Doctrine Common package in the | |
* // Doctrine\Common namespace. |
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
some_fun(req, res, next) | |
.pipe(function() { return redis.incr('next_id') }) | |
.fail(function(e) { return next(e); }) | |
.pipe(function() { return redis.set('key', {id:r, now:Date.now()}) }) | |
.done(function(res) {res.send([1, 'ok'];}) | |
.fail(function(e) {return next(e); }) |
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
String tmp = ""; | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
while (Serial.available() > 0) { | |
tmp += char(Serial.read()); |
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
const int ledPin = 9; // the pin that the LED is attached to | |
void setup() | |
{ | |
// initialize the serial communication: | |
Serial.begin(9600); | |
// initialize the ledPin as an output: | |
pinMode(ledPin, OUTPUT); | |
} |
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
#include <SoftwareSerial.h> | |
SoftwareSerial mySerial(9, 10); //RX,TX | |
String tmp; | |
void setup() { | |
Serial.begin(9600); | |
mySerial.begin(9600); | |
}; |