Pointing your domains to a gh-pages branch requires three steps.
- Add the Github IPs as
Arecords on Namecheap.
185.199.108.153
185.199.109.153
185.199.110.153
185.199.111.153
| -- Note: There is a more complete explanation at https://github.com/hwayne/lets-prove-leftpad/tree/master/idris | |
| import Data.Vect | |
| -- `minus` is saturating subtraction, so this works like we want it to | |
| eq_max : (n, k : Nat) -> maximum k n = plus (n `minus` k) k | |
| eq_max n Z = rewrite minusZeroRight n in rewrite plusZeroRightNeutral n in Refl | |
| eq_max Z (S _) = Refl | |
| eq_max (S n) (S k) = rewrite sym $ plusSuccRightSucc (n `minus` k) k in rewrite eq_max n k in Refl | |
| -- The type here says "the result is" padded to (maximum k n), and is padding plus the original |
| git rebase "$(git merge-base HEAD master)" -x 'git commit --amend -C HEAD --date="$(date -R)" && sleep 1.05' |
| /** | |
| * ------------------------------------------ | |
| * MD5 function for GAS(GoogleAppsScript) | |
| * | |
| * You can get a MD5 hash value and even a 4digit short Hash value of a string. | |
| * ------------------------------------------ | |
| * Usage1: | |
| * `=MD5("YourStringToHash")` | |
| * or | |
| * `=MD5( A1 )` |
| /** | |
| * Based on Ben Trengrove's example: https://gist.github.com/bentrengrove/9759a3fbb564d62e1e63f417c58a3895 | |
| */ | |
| package units | |
| import java.util.concurrent.TimeUnit | |
| abstract class Unit(val suffix: String, val ratio: Double) { | |
| internal fun convertToBaseUnit(amount: Double) = amount * ratio | |
| internal fun convertFromBaseUnit(amount: Double) = amount / ratio |
| package main | |
| /* | |
| * A simple go program to download all the high resolution pictures from your facebook albums. | |
| * | |
| * To run this: | |
| * 1. Go to https://developers.facebook.com/tools/explorer/?method=GET&path=me&version=v2.8 | |
| * 2. Get an Access Token: Get Token > Get User Access Token > Check "user_photos" | |
| * 3. Paste in the app. | |
| */ |
| // A reminder to myself on how to quickly create a throw away gui app on OSX (i.e. a single file, | |
| // w/o relying on XCode project templates | |
| //Notes: In general it is hard to know how to create a Cocoa based gui without using XCode. | |
| //This issue has existed for both Objective-C and now Swift | |
| //Furthermore, Swift<-->Cocoa syntax has changed dramatically over various Swift versions, | |
| //making stackoverflow posts unreliable | |
| //This file provides a template for creating a throw away gui app |
| = Resources = | |
| * zsh - http://www.zsh.org/ | |
| * ZSH-LOVERS - http://grml.org/zsh/zsh-lovers.html | |
| * manual - http://zsh.sourceforge.net/Doc/Release/index.html | |
| * oh-my-zsh - https://github.com/robbyrussell/oh-my-zsh | |
| * prezo - https://github.com/sorin-ionescu/prezto | |
| * zsh-users - https://github.com/zsh-users | |
| = Functions = |
| <?xml version="1.0" encoding="utf-8"?> | |
| <!-- | |
| Copyright 2016 Google Inc. | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 |
| import org.gradle.internal.os.OperatingSystem; | |
| String getJavaHome(String version) { | |
| def stdout = new ByteArrayOutputStream() | |
| exec { | |
| commandLine "/usr/libexec/java_home", "-v", version | |
| standardOutput = stdout; | |
| } | |
| return stdout.toString().trim() | |
| } |