A Pen by Captain Anonymous on CodePen.
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
var rawParser = bodyParser.raw({type: '*/*'}); | |
app.post('/zipped', rawParser, function(req, res) { | |
console.log('here we go'); | |
console.log('body', req.body); | |
console.log('req body len', req.body.length); | |
console.log('body.toString',req.body.toString() ); | |
// console.log('body.toJSON', req.body.toJSON() ); | |
var theData = req.body.toJSON(); |
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
[ | |
["Lobby", "M Toilet", "M Toilet", "M Toilet", "Shower", "Out", "Shower", "Shower", "Coffee machine", "V meeting N", "V meeting N", "V meeting N", "V meeting N", "V meeting N", "V meeting N", "V meeting N", "V meeting N", "V meeting N", "Coffee machine", "Model area", "Model area", "Model area", "Model area", "Model area", "Coffee machine", "My Desk", "My Desk", "My Desk", "My Desk", "My Desk", "V meeting S", "V meeting S", "V meeting S", "V meeting S", "Coffee machine", "Coffee machine", "My Desk", "My Desk", "M Toilet", "Shower", "Coffee machine", "Hug", "Hug", "Hug", "My Desk", "Resourse Bay", "Model area", "Coffee machine", "Out", "Out", "Out", "Out", "Out", "Out", "Lobby", "Reception", "Hug", "Hug", "Hug", "Hug", "My Desk", "My Desk", "My Desk", "Coffee machine", "My Desk", "Coffee machine", "Model area", "Model area", "Model area", "Coffee machine", "Out", "Out", "Out", "Out", "Out", "Out", "Out", "Shower", "Shower", "Shower", "My Desk", "My Desk", "My Desk", "My Desk", "My Desk", "M Toilet", "M To |
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
import itertools | |
import random | |
colours = ["#e67e22","#f1c40f","#27ae60","#1abc9c","#2980b9","#c0392b"] | |
places = ["Verandah","Kitchen","Toilet","Shower","Desk","Someone else's desk","Meeting N","Meeting S","Quiet N","Quiet S"] | |
pairs = itertools.combinations(places, 2) | |
pairs = list(pairs) |
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
#example response: {"valid":false,"reason":"taken","msg":"Username has already been taken","desc":"That username has been taken. Please choose another."} | |
permissableChars = list("abcdefghijklmnopqrstuvwxyz_1234567890") | |
import json | |
import urllib2 | |
import itertools | |
possibleUsernames = [] |
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 servePhoto(request) { | |
var storageUrl = request.url.replace(/-\d+px\.jpg$/, ''); | |
return caches.open(contentImgsCache).then(function(cache) { | |
return cache.match(storageUrl).then(function(response) { | |
if (response) return response; | |
return fetch(request).then(function(networkResponse) { | |
cache.put(storageUrl, networkResponse.clone()); | |
return networkResponse; |
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
--------------------------------------------------------------------------------------------------------------------------- Class 1 | |
public class Script_Instance : GH_ScriptInstance | |
{ | |
#region Utility functions | |
/// <summary>Print a String to the [Out] Parameter of the Script component.</summary> | |
/// <param name="text">String to print.</param> | |
private void Print(string text) { /* Implementation hidden. */ } | |
/// <summary>Print a formatted String to the [Out] Parameter of the Script component.</summary> | |
/// <param name="format">String format.</param> | |
/// <param name="args">Formatting parameters.</param> |
This is a plugin meant for Jekyll.
It's a fork of joelverhagen's youtube plugin. This version is for bootstrap responsive embed.
Width and height don't really mean anything as they are overridden by the bootstrap aspect ratio class name.
Example use:
Easily embed a YouTube video. Just drop this file in your _plugins
directory.
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
// getRowsData iterates row by row in the input range and returns an array of objects. | |
// Each object contains all the data for a given row, indexed by its normalized column name. | |
// Arguments: | |
// - sheet: the sheet object that contains the data to be processed | |
// - range: the exact range of cells where the data is stored | |
// - columnHeadersRowIndex: specifies the row number where the column names are stored. | |
// This argument is optional and it defaults to the row immediately above range; | |
// Returns an Array of objects. | |
function getRowsData(sheet, range, columnHeadersRowIndex) { | |
columnHeadersRowIndex = columnHeadersRowIndex || range.getRowIndex() - 1; |
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
import rhinoscriptsyntax as rs | |
import Rhino.Geometry as rg | |
#from clr import AddReference as addr | |
#addr("Grasshopper") | |
#from System import Object | |
#from Grasshopper import DataTree | |
#from Grasshopper.Kernel.Data import GH_Path | |
import random |