Skip to content

Instantly share code, notes, and snippets.

@ahsquared
ahsquared / Google-Sheet-Form-Post.md
Created November 4, 2020 14:28 — 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

Depreciation Warning: This code is not maintained, and should be seen as reference implementation only. If you're looking to add features or update, fork the code and update as needed.

Run example

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

@ahsquared
ahsquared / cloudSettings
Created January 25, 2020 02:07
cloudSettings
{"lastUpload":"2019-08-14T20:33:56.411Z","extensionVersion":"v3.4.1"}

Keybase proof

I hereby claim:

  • I am ahsquared on github.
  • I am ahsquared (https://keybase.io/ahsquared) on keybase.
  • I have a public key ASDJc6AqtXFR9nVJAjgDbiMFXhVS711QfKGtvlY0wflafgo

To claim this, I am signing this object:

" Make IE Better Compatible "
<!--[if IE]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
======================================================
IE6 Only
==================
_selector {...}
@ahsquared
ahsquared / jQuery-tap.js
Created January 23, 2019 16:00 — forked from subhaze/jQuery-tap.js
Probably a more sane way to do this, but, here's a x-device click/tap event; It works with event delegation as well.
jQuery.event.special.tap = {
add: function(handleObj){
var $this = $(this);
var touchMoved = false;
var touched = false;
var touchesHandler = function(e){
if(e.type === 'touchstart'){
touchMoved = false;
touched = true;
}else if(e.type === 'touchmove'){
@ahsquared
ahsquared / sequelize-schema-file-generator.js
Created July 15, 2018 02:01 — forked from francolaiuppa/sequelize-schema-file-generator.js
Automatically generates migration files from your sequelize models
'use strict';
//////////////////////////////////
// How to use?
// 1. Create `sequelize-schema-file-generator.js` in your app root
// 2. Make sure you've ran the `sequelize init` before (It should create `config`,`seeders`,`migrations` folders).
// 3. Update `DATABASE_DSN` below to match your connection string (works with any database adapter that Sequelize supports)
// 4. Run it with `node sequelize-schema-file-generator.js`
// 5. Review the generated migrations inside of the `migrations` folder.
//////////////////////////////////
@ahsquared
ahsquared / Hex pack shader
Last active March 23, 2017 13:59
Hex packing shader for shadertoy
float hex(vec2 p) {
p.x *= 0.57735*2.0;
p.y += mod(floor(p.x), 2.0)*0.5;
p = abs((mod(p, 1.0) - 0.5));
return abs(max(p.x*1.5 + p.y, p.y*2.0) - 1.0);
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 pos = fragCoord.xy;
vec2 p = pos/20.0;
@ahsquared
ahsquared / bash_profile
Last active February 1, 2017 16:22
bash profile for OSX
### MY ALIASES ###
##################
# git command autocompletion script
# source ~/bin/git-completion.bash
# clear screen
alias cls='clear'
# git commands simplified
@ahsquared
ahsquared / Queueing with RxJS
Last active December 1, 2016 14:59
Set up a queue of Observables with RxJS
stream$.flatMap(array => {
let observablesArray = array.map(arrayItem => {
// map over array returning observables - this can be nested and flattened
return Rx.Observable.fromPromise(promiseFunction(arrayItem))
// whatever other rx-y things you need to do
.retry(2)
// what do we really want to do with these errors
.catch(e => {
return Rx.Observable.of({
errorStatus: true,
@ahsquared
ahsquared / Compress JPG with ImageMagick
Last active March 7, 2019 19:04
Compress JPG with ImageMagick
convert -strip -interlace Plane -sampling-factor 4:2:0 -define jpeg:dct-method=float -quality 70% source.jpg output.jpg