Skip to content

Instantly share code, notes, and snippets.

View vlucas's full-sized avatar

Vance Lucas vlucas

View GitHub Profile

Google Apps Script Spreadsheet Utilities and Custom Functions#

These utilities are grouped into related files, for simpler copy & paste to your scripts.

ConvertA1.gs

A couple of helper functions to convert to & from A1 notation.

cellA1ToIndex( string cellA1, number index )

How domain names turn into valid IPs

It's more than you probably think

  1. A user types the URL http://www.example.com into a browser.

  2. The browser sends a request for the IP address of www.example.com to its local resolver (stub-resolver).

  3. The stub-resolver queries the locally configured DNS Resolver for the IP address of www.example.com.

@jasonkneen
jasonkneen / sample.js
Last active August 29, 2015 14:01
DynamicLabel tag in Alloy - allows you to update a "value" and it applies it to a template. Place ui.js in your app/lib folder
$.recordCount.value = 99
@hhatfield
hhatfield / redirector.sh
Created May 2, 2014 18:10
Bash redirector with command name
#!/bin/bash
outfile=${*: -1:1}
remove=1
echo "$@" > $outfile; "${@:1:$(($#-remove))}" >> $outfile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andrewdc
andrewdc / gulpfile.js
Created April 14, 2014 15:39
Simple Static Site Generator with Gulp
var gulp = require('gulp'),
gutil = require('gulp-util'),
sass = require('gulp-sass'),
rubysass = require('gulp-ruby-sass'),
fileinclude = require('gulp-file-include'),
rename = require('gulp-rename'),
notify = require('gulp-notify'),
livereload = require('gulp-livereload'),
lr = require('tiny-lr'),
connect = require('gulp-connect'),
@padraic
padraic / checksslcontext.php
Last active October 29, 2020 01:10
Correct SSL/TLS Context Settings for file_get_contents() and other PHP stream calls under PHP 5.5 (or earlier)
<?php
ini_set('display_errors', 1);
/**
* This script check how PHP makes HTTPS (SSL/TLS) requests using PHP Streams
* or cURL. Configuration options are passed as GET parameters, for example:
* http://localhost/checksslcontext.php?reconfigure=1
*
* Configuration:
* http://localhost/checksslcontext.php
* Basic PHP Streams using file_get_contents(). Default settings.
@tmaiaroto
tmaiaroto / collection+json.md
Last active May 23, 2022 12:29
JSON Based Hypermedia Structures - Notes & Comparisons

Collection+JSON format

http://amundsen.com/media-types/collection/examples/

This format takes into consideration collections (much like Siren). It also takes into consideration versioning. However, I'm not certain version matters in the data set if it pertains to an API version. That is best left being in the API URL. It could pertain to collection version, but I'm not sure the point. Documentation says each collection should have a version - but says nothing more about meaning or why.

Items are clearly distinct in this format and are organizationally positioned separate from links.
This is by far the most collision free structure.

However, the data format itself is a bit strange...Every field being an array. Data is always an array of objects. I understand the flexibility this presents and am not 100% against it. I just believe it's perhaps not needed as things could change based on the client application.

@ungoldman
ungoldman / dokku_setup.md
Last active November 28, 2023 12:35
Deploy your own PaaS: Setting up Dokku with DigitalOcean and Namecheap

Deploy your own PaaS!

Setting up Dokku with DigitalOcean and Namecheap

..or how I made my own heroku in a few hours for $3.98.


This write-up is several years out of date! You probably shouldn't use it.