Skip to content

Instantly share code, notes, and snippets.

@CVertex
CVertex / Google-Sheet-Form-Post.md
Created July 9, 2017 04:25 — forked from willpatera/Google-Sheet-Form-Post.md
Post to google spreadsheet from html form

Overview

This collection of files serves as a simple static demonstration of how to post to a google spreadsheet from an external html <form> following the example by Martin Hawksey

Run example

You should be able to just open index.html in your browser and test locally.

However if there are some permissions errors you can make a quick html server with python. Open terminal and cd to the directory where the gist files are located and enter python -m SimpleHTTPServer. By default this creates a local server at localhost:8000

@CVertex
CVertex / Interval.cs
Created November 23, 2016 06:44 — forked from hongymagic/Interval.cs
Representing Intervals in C# with Generics support `Interval<T>`
using System;
namespace Hongy
{
/// <summary>
/// Represents vectorless interval of the form [a, b] or (a, b) or any
/// combination of exclusive and inclusive end points.
/// </summary>
/// <typeparam name="T">Any comparent type</typeparam>
/// <remarks>
@CVertex
CVertex / model_to_release.py
Created October 10, 2016 04:11 — forked from keunwoochoi/model_to_release.py
playlist generation model
import keras
from keras.models import Sequential
from keras.layers.core import Dense, Activation, Dropout, TimeDistributedDense
from keras.layers.recurrent import LSTM, SimpleRNN
def build_model(num_layers=2, num_units=256, maxlen_rnn=50, dim_label=50):
'''
num_layers: in [2, 3]
num_units: in [256, 512, 1024]
@CVertex
CVertex / DeliminatorSeparatedPropertyNamesContractResolver.cs
Created September 24, 2016 12:13 — forked from roryf/DeliminatorSeparatedPropertyNamesContractResolver.cs
Snake case (underscore separated) property name resolver for Newtonsoft.Json library
public class DeliminatorSeparatedPropertyNamesContractResolver : DefaultContractResolver
{
private readonly string _separator;
protected DeliminatorSeparatedPropertyNamesContractResolver(char separator) : base(true)
{
_separator = separator.ToString();
}
protected override string ResolvePropertyName(string propertyName)
@CVertex
CVertex / debouncer.js
Created July 7, 2016 06:57 — forked from jasonwyatt/debouncer.js
How to **correctly** debounce an event that will be triggered many times with identical arguments.
function debounce(fn, debounceDuration){
// summary:
// Returns a debounced function that will make sure the given
// function is not triggered too much.
// fn: Function
// Function to debounce.
// debounceDuration: Number
// OPTIONAL. The amount of time in milliseconds for which we
// will debounce the function. (defaults to 100ms)
import UIKit
struct Person {
let name: String
let city: String
}
let people = [
Person(name: "Chris", city: "Berlin"),
Person(name: "Natasha", city: "Tokyo"),
@CVertex
CVertex / extract-testflight.js
Created November 26, 2015 02:00
Extract TestFlight user email addresses from iTunes Connect
var text = '';
$('.itc-tester-view tbody tr').each(function(index, el) {
var email = el.querySelector('td:nth-child(2) span:first-child').innerText;
var name = el.querySelector('.sorted > span').innerText.split(' ');
text = text + name[0] + ', ' + name[1] + ', ' + email+'\n';
});
var a = document.createElement("a");
var file = new Blob([text], {type: 'text/csv'});
a.href = URL.createObjectURL(file);
<form action="#" id="courseGuideForm" method="post">
<input type="hidden" name="X-Requested-With" value="XMLHttpRequest" />
<input type="text" name="Name" value="" />
<input type="text" name="Email" value="" />
<input type="button" class="submitButton" value="Get Your Guide Now" />
//
// MvrInertia.h
// Mover-iPad
//
// Created by ∞ on 30/03/10.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
//
// ILViewController.h
// ILViewController
//
// Created by ∞ on 07/04/10.
//
// The contents of this file are in the public domain.
#import <UIKit/UIKit.h>