INSERT GRAPHIC HERE (include hyperlink in image)
Subtitle or Short Description Goes Here
ideally one sentence >
| # Author: Pieter Noordhuis | |
| # Description: Simple demo to showcase Redis PubSub with EventMachine | |
| # | |
| # Update 7 Oct 2010: | |
| # - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
| # the WebSocket protocol implementation in the cramp gem does not work | |
| # well with Chrome's (newer) WebSocket implementation. | |
| # | |
| # Requirements: | |
| # - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
| <?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 |
| # download docx2txt by Sandeep Kumar | |
| wget -O docx2txt.pl http://www.cs.indiana.edu/~kinzler/home/binp/docx2txt | |
| # make a wrapper | |
| echo '#!/bin/bash | |
| docx2txt.pl $1 -' > docx2txt | |
| chmod +x docx2txt | |
| # make sure docx2txt.pl and docx2txt are your current PATH. Here's a guide | |
| http://shapeshed.com/using_custom_shell_scripts_on_osx_or_linux/ |
| extension NSTimer { | |
| /** | |
| Creates and schedules a one-time `NSTimer` instance. | |
| - Parameters: | |
| - delay: The delay before execution. | |
| - handler: A closure to execute after `delay`. | |
| - Returns: The newly-created `NSTimer` instance. | |
| */ |
| package main | |
| import ( | |
| "log" | |
| "net" | |
| ) | |
| func main() { | |
| var status string | |
| conn, err := net.Dial("tcp", "127.0.0.1:80") |
Makes it simple to use Spark's role feature on routes
Route::group(['middleware'=>'role:owner'], function(){
// owners only
});
Route::group(['middleware'=>'role:member'], function(){| package yourgaeproject | |
| // go-iap doesn't work for GAE since we need to use urlfetch | |
| // | |
| // Copy this source file to your GAE to your project. | |
| // | |
| // The API is mostly the same as go-iap. I prefixed some stuff since this file lives within my GAE project's package. | |
| // client, err := PlaystoreNew(ctx, jsonKey) | |
| // | |
| // purchase, err := client.VerifyProduct("com.you.yourapp", productId, purchaseToken) |
Concurrency is a domain I have wanted to explore for a long time because the locks and the race conditions have always intimidated me. I recall somebody suggesting concurrency patterns in golang because they said "you share the data and not the variables".
Amused by that, I searched for "concurrency in golang" and bumped into this awesome slide by Rob Pike: https://talks.golang.org/2012/waza.slide#1 which does a great job of explaining channels, concurrency patterns and a mini-architecture of load-balancer (also explains the above one-liner).
Let's dig in: