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
<script type="text/javascript"> | |
// Basic Usage | |
var table = $('#example-table').tableToJSON(); | |
// table == [{"First Name"=>"Jill", "Last Name"=>"Smith", "Score"=>"disqualified"}, | |
// {"First Name"=>"Eve", "Last Name"=>"Jackson", "Score"=>"94"}, | |
// {"First Name"=>"John", "Last Name"=>"Doe", "Score"=>"80"}, | |
// {"First Name"=>"Adam", "Last Name"=>"Johnson", "Score"=>"67"}] | |
// Ignore first column (name) | |
var table = $('#example-table').tableToJSON({ |
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
wifi.setmode(wifi.STATION) | |
wifi.sta.config("creationix","noderocks") | |
wifi.sta.connect() | |
tmr.alarm(0, 1000, 1, function () | |
local ip = wifi.sta.getip() | |
if ip then | |
tmr.stop(0) | |
print(ip) | |
dofile("websocket.lc") | |
dofile("main.lc") |
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
// Load the TCP Library | |
net = require('net'); | |
// Keep track of the chat clients | |
var clients = []; | |
// Start a TCP Server | |
net.createServer(function (socket) { | |
// Identify this client |
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 | |
// API access key from Google API's Console | |
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' ); | |
$registrationIds = array( $_GET['id'] ); | |
// prep the bundle | |
$msg = array |
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 off | |
set dbUser=root | |
set dbPassword=password | |
set backupDir="C:\Documents and Settings\user\Desktop\backup\mysql" | |
set mysqldump="C:\Program Files\MySQL\MySQL Workbench 5.2 CE\mysqldump.exe" | |
set mysqlDataDir="C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.1\data" | |
set zip="C:\Program Files\7-Zip\7z.exe" | |
:: get date |
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/sh | |
##3.5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80 | |
## | |
## Debian / Linux / Ubuntu / LSB | |
## Startup script for Express / Node.js application with the forever module | |
## | |
## | |
## A modification of "init.d.lsb.ex" by Nicolas Thouvenin | |
## | |
## |
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
var app = angular.module('app', ['ngResource']); | |
app.config(function($locationProvider, $routeProvider) { | |
// $locationProvider.html5Mode(true); | |
$routeProvider | |
.when('/', { templateUrl: 'partials/index', controller: 'ctrl' }) | |
.when('/about', { templateUrl: 'partials/about', controller: 'ctrl' }) | |
.otherwise({redirectTo:'/'}); | |
}); |
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
$m = new MongoClient(); // connect to local mongodb | |
$db = $m->products; //select 'mongo database' named products | |
$clothing_col = $db->clothing; //create a collection from the 'table' clothing | |
//create the aggregation | |
//create the Match on clothing-category = shoes or brand = nike | |
$ops = array( | |
array( | |
'$match' => | |
array('$or' => |
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 | |
/* | |
* Author: David T. Sadler (http://davidtsadler.com) | |
* Date: 2013-03-29 | |
* License: I release this example into the public domain. Use at your own risk. | |
* | |
* Example showing how to list an item to the eBay Sandbox using the eBay Accelerator Toolkit New Schema (EbatNS) for PHP. | |
* | |
* This example uses version 815 released on the 2013-03-22. | |
* http://www.intradesys.de/en/system/files/its_downloads/EbatNs_1_0_815_P5_0.zip |
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 | |
// Constants | |
$FIREBASE = "_YOUR_FIREBASE_URL_"; | |
$NODE_DELETE = "temperature.json"; | |
$NODE_GET = "temperature.json"; | |
$NODE_PATCH = ".json"; | |
$NODE_PUT = "temperature.json"; | |
// Data for PUT |
OlderNewer