Skip to content

Instantly share code, notes, and snippets.

Avatar

Myles O'Connor mocon

View GitHub Profile
@mocon
mocon / example.js
Created Jan 15, 2021
Possible solution
View example.js
// 1. Loop through all tree IDs, and make a map with unique, auto-generated, letter-only keys for each one
var nameMap = {
"01234a": "ayenej",
"01234a": "oowket",
// ...and so on
}
// 2. Convert column names according to map above
// 3. Use map to display tree IDs by their key
View gist:13b50b4d665901450dc57ab055703b4b

Habit Tracker 0.0.1

Keep track of your recurring habits, and view your completion percentages over time.

Views

These are the four required views within the app:

Login/Signup, Code view

@mocon
mocon / settings.json
Created Oct 4, 2019
VS Code user settings file, located at `~/Library/Application Support/Code/User/settings.json`
View settings.json
{
"window.zoomLevel": -1,
"workbench.iconTheme": "vscode-icons",
"vsicons.dontShowNewVersionMessage": true,
"editor.tabSize": 2,
"editor.fontFamily": "InputMono-Regular",
"editor.wordWrap": "on",
"editor.fontSize": 15,
"editor.occurrencesHighlight": false,
"editor.selectionHighlight": true,
View r_example.md

R example

if (y < 0 && debug) {
  message("Y is negative")
}

if (y == 0) {
  log(x)
} else {
View snippets.cson
# JavaScript
'.source.js':
'console.log':
'prefix': 'cl'
'body': 'console.log(\'$1 👉\', $1)$2'
'console.log JSON':
'prefix': 'clj'
'body': 'console.log(\'$1 👉\', JSON.stringify($1, null, 2))$2'
# CSS
'.source.css':
@mocon
mocon / commands.md
Last active May 1, 2019
Install Node.js on Raspberry Pi, set up SSH keys for GitHub, clone the project repo
View commands.md

Install node and npm

wget -O - https://raw.githubusercontent.com/audstanley/NodeJs-Raspberry-Pi/master/Install-Node.sh | sudo bash

Confirm that they are installed

node -v
@mocon
mocon / test.scpt
Created Feb 20, 2019
iTerm2 example script (save in `~/Library/Application Support/iTerm2/Scripts/test.scpt`, trigger with `Scripts --> test.scpt` in iTerm2)
View test.scpt
tell application "iTerm"
tell current session of current window
split vertically with default profile
split vertically with default profile
end tell
tell first session of current tab of current window
write text "cd ~/somewhere"
write text "run some command"
end tell
tell second session of current tab of current window
@mocon
mocon / styles.less
Created Feb 5, 2019
Atom stylesheet
View styles.less
* {
font-family: 'Monoid';
}
atom-panel .title,
atom-pane .title,
.tree-view,
atom-panel-container.footer {
font-size: 80%;
}
View index.html
<!doctype html>
<html lang="en"
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<title>GumGum Design System</title>
<meta name="description" content="">
<meta name="author" content="">
<link rel="stylesheet" href="https://assets.ggops.com/stable/theme-blue.css">
</head>