This file contains 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
gitclean () { | |
for branch in `git branch -vv | grep ': gone]' | awk '{print $1}'` | |
do | |
git branch -D $branch | |
done | |
} |
This file contains 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
#!/bin/bash | |
## Conventions: | |
## | |
## Working directory has the same name as the s3 bucket. | |
## Script is executed from the parent of this directory. | |
## | |
#!/bin/bash |
This file contains 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 authorize_api_usage(client_id, scope, user) { | |
return new Promise((res,rej) => { | |
const token_client = google.accounts.oauth2.initTokenClient({ | |
client_id, | |
scope, | |
hint: user.email, | |
callback: (response) => { | |
if (!response.access_token) { | |
return rej('authorization-failed'); | |
} |
This file contains 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 onetap(cb) { | |
function _handle_prompt_events(event) { | |
if (event.isNotDisplayed()) { | |
if (event.getNotDisplayedReason() === 'suppressed_by_user') { | |
window.localStorage.removeItem('gothic-id'); | |
cb('onetap-suppressed'); | |
} | |
} | |
if (event.isSkippedMoment()) { |
This file contains 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
async function on_response(response) { | |
if (response && response.credential) { | |
const rawdata = jwt_decode(response.credential); | |
const user = (({ email, family_name, given_name, picture, name }) => ({ email, family_name, given_name, picture, name}))(rawdata); | |
window.localStorage.setItem('gothic-id', 'loaded'); | |
} | |
// leverage user object or move on to next step. | |
} |
This file contains 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 load_libaries(client_id, api_key, discovery) { | |
let goog_ready = false; | |
let gapi_ready = false; | |
let pass; | |
let fail; | |
let ready = new Promise((res, rej) => { | |
pass = res; |
This file contains 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
Rating Range | Level | |
---|---|---|
2800+ | World Champion | |
2600+ | Grandmaster | |
2400+ | International Master | |
2200+ | Master | |
2000+ | Expert | |
1600+ | Club player | |
1300+ | Amateur | |
1000+ | Casual | |
under 1000 | Beginner |
This file contains 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
ELO | USCF | FIDE | |
---|---|---|---|
2600 | Grandmaster* | ||
2400 and up | Senior Master | International Master* | |
2300 | Fide Master | ||
2200 | National Master | Candidate Master | |
2000 | Expert |