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 debug = process.env.NODE_ENV !== "production"; | |
var webpack = require('webpack'); | |
module.exports = { | |
context: __dirname, | |
devtool: debug ? "inline-sourcemap" : null, | |
entry: "./js/scripts.js", | |
output: { | |
path: __dirname + "/js", | |
filename: "scripts.min.js" |
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 | |
# This script builds the iOS and Mac openSSL libraries with Bitcode enabled | |
# Download openssl http://www.openssl.org/source/ and place the tarball next to this script | |
# Credits: | |
# https://github.com/st3fan/ios-openssl | |
# https://github.com/x2on/OpenSSL-for-iPhone/blob/master/build-libssl.sh | |
# Peter Steinberger, PSPDFKit GmbH, @steipete. | |
# Doron Adler, GlideTalk, @Norod78 |
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 | |
############################################################################### | |
## ## | |
## Build and package OpenSSL static libraries for OSX/iOS ## | |
## ## | |
## This script is in the public domain. ## | |
## Creator : Laurent Etiemble ## | |
## ## | |
############################################################################### |
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 | |
# This script downloads and builds the iOS, tvOS and Mac openSSL libraries with Bitcode enabled | |
# Credits: | |
# https://github.com/st3fan/ios-openssl | |
# https://github.com/x2on/OpenSSL-for-iPhone/blob/master/build-libssl.sh | |
# https://gist.github.com/foozmeat/5154962 | |
# Peter Steinberger, PSPDFKit GmbH, @steipete. | |
# Felix Schwarz, IOSPIRIT GmbH, @felix_schwarz. |
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
{ | |
"docs": [ | |
{ | |
"name": "Squirtle", | |
"type": ["Water"], | |
"trainer": "Ash", | |
"gender": "m", | |
"owned": "1999-05-21" | |
}, | |
{ |
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
// Implements multipart/form-data POST in C# http://www.ietf.org/rfc/rfc2388.txt | |
// http://www.briangrinstead.com/blog/multipart-form-post-in-c | |
public static class FormUpload | |
{ | |
private static readonly Encoding encoding = Encoding.UTF8; | |
public static HttpWebResponse MultipartFormDataPost(string postUrl, string userAgent, Dictionary<string, object> postParameters) | |
{ | |
string formDataBoundary = String.Format("----------{0:N}", Guid.NewGuid()); | |
string contentType = "multipart/form-data; boundary=" + formDataBoundary; |
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
using System; | |
using System.Web.Mvc; | |
using Divan; | |
using Newtonsoft.Json; | |
namespace CouchTest.Controllers | |
{ | |
[HandleError] | |
public class HomeController : Controller | |
{ |
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
/*************************************************************************** | |
* This is a Monte Carlo simulation | |
* to see who will win the 2014 World Cup | |
* Data ideas: http://fivethirtyeight.com/interactives/world-cup/ | |
* See: http://goo.gl/NV2OLc for a diagram of the odds. | |
* Author: Ido Green | @greenido | plus.google.com/+greenido | |
* Date: 4th July 2014 | |
* *************************************************************************/ | |
// Decide base on our odds who will win each match |
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
/** | |
* YouTube Dashboard Stats Example | |
* Fetch stats on videos and channel by using YT APIs. | |
* 1. It using the ATOM feeds - v1. | |
* 2. For the channel we are using the v3 version of the API. | |
* | |
* @Author: Ido Green | @greenido | +Greenido | |
* @Date: Aug 2014 | |
* | |
* @see: |
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
/** | |
* YouTube Analytics API Example | |
* Fetch views and 'estimated view time' on videos you have in your channel. | |
* | |
* @Author: Ido Green | |
* @Date: Aug 2014 | |
* | |
*/ | |
function getVideoEstimatedMinutesWatched(videoId) { | |
var myChannels = YouTube.Channels.list('id', {mine: true}); |