This file contains hidden or 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
function doGet() { | |
var app = UiApp.createApplication(); | |
var t = app.createTextBox().setName('t').setId('t'); | |
app.add(t); | |
app.add(app.createButton('OK', app.createServerHandler('click').addCallbackElement(t))); | |
return app; | |
} | |
function click(e) { | |
var app = UiApp.getActiveApplication(); | |
if(e.parameter.t == '') return; |
This file contains hidden or 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
function doGet() { | |
var app = UiApp.createApplication(); | |
var t = app.createTextBox().setName('t').setId('t'); | |
app.add(t); | |
app.add(app.createButton('OK', app.createServerHandler('click').addCallbackElement(t))); | |
return app; | |
} | |
function click(e) { | |
var app = UiApp.getActiveApplication(); | |
if(e.parameter.t == '') return; |
This file contains hidden or 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
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
var FORMAT_ONELINE = 'One-line'; | |
var FORMAT_MULTILINE = 'Multi-line'; | |
var FORMAT_PRETTY = 'Pretty'; | |
var LANGUAGE_JS = 'JavaScript'; | |
var LANGUAGE_PYTHON = 'Python'; |
This file contains hidden or 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
(function (window, checkNode){ | |
var p = {}; | |
var m = { | |
registerObserver: function() { | |
if (typeof(window.WebKitMutationObserver) == "undefined") return; | |
p.observer = new window.WebKitMutationObserver(function(mutationRecords) { | |
mutationRecords.forEach(function(mutationRecord) { | |
for (var i = 0; i < mutationRecord.addedNodes.length; ++i) |
This file contains hidden or 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
/* | |
Chrome Packaged app Bluetooth API test | |
Before interacting with a BT device, you need to : | |
1) get the device MAC and service UUID with startDiscovery and getServices methods | |
2) request permission with chrome.permissions.request | |
3) add the service profile with chrome.bluetooth.addProfile (a profile is only {uuid:'xxxxxxx...'}) | |
*/ | |
// onConnection callback | |
chrome.bluetooth.onConnection.addListener( |
This file contains hidden or 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
# install dependencies | |
sudo apt-get install libcurl4-openssl-dev libncurses5-dev pkg-config automake yasm | |
# clone cpuminer | |
git clone https://github.com/pooler/cpuminer.git | |
# compile | |
cd cpuminer | |
./autogen.sh | |
./configure CFLAGS="-O3" |
This file contains hidden or 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
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
var FORMAT_ONELINE = 'One-line'; | |
var FORMAT_MULTILINE = 'Multi-line'; | |
var FORMAT_PRETTY = 'Pretty'; | |
var LANGUAGE_JS = 'JavaScript'; | |
var LANGUAGE_PYTHON = 'Python'; |
This file contains hidden or 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 | |
/** | |
* Convert a comma separated file into an associated array. | |
* The first row should contain the array keys. | |
* | |
* Example: | |
* | |
* @param string $filename Path to the CSV file | |
* @param string $delimiter The separator used in the file | |
* @return array |
This file contains hidden or 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
username: vagrant | |
password: vagrant | |
sudo apt-get update | |
sudo apt-get install build-essential zlib1g-dev git-core sqlite3 libsqlite3-dev | |
sudo aptitude install mysql-server mysql-client | |
sudo nano /etc/mysql/my.cnf |
This file contains hidden or 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
sha256sum -b ./dbapp.war > ./dbapp.sha256 | |
gsutil cp ./dbapp.war ./dbapp.sha256 gs://stathy/${JOB_NAME}/${BUILD_NUMBER}/ | |
gsutil setacl public-read gs://stathy/${JOB_NAME}/${BUILD_NUMBER}/dbapp.war | |
gsutil setacl public-read gs://stathy/${JOB_NAME}/${BUILD_NUMBER}/dbapp.sha256 | |
cd ${WORKSPACE} | |
gcutil addinstance dbapp-db dbapp-app1 dbapp-lb \ | |
--project "opscode.com:stathy" --image "/projects/opscode.com:stathy/images/centos-latest" \ |
OlderNewer