Skip to content

Instantly share code, notes, and snippets.

View andkon's full-sized avatar
🤠

Andrew Konoff andkon

🤠
View GitHub Profile
## Inspiration
*[Botwiki's List of Bots](https://botwiki.org/bots/)
@andkon
andkon / outdoors.md
Last active September 22, 2020 18:21
Toronto Outdoors

Spring/summer/fall (in order of distance)

  • Daytrip list
  • Tobermory swimming holes/grotto
  • Bruce Peninsula National Park - you can book backcountry sites here. Very chill hike, but really beautiful. I came from the east parking lot and then got a ride back to my car, but you could definitely just park at the main campground, camp at site HD6 (or thereabouts), and then hike back the next day, as it was only about 12km from there to the main camp.
  • Algonquin Provincial Park - I've only ever carcamped here, but there's a loo
@andkon
andkon / File permissions
Created January 11, 2017 23:09
ROS https config debug
# inside the live (symlinked) folder:
lrwxrwxrwx 1 root root 34 Jan 11 00:55 cert.pem -> ../../archive/sumgud.com/cert1.pem
lrwxrwxrwx 1 root root 35 Jan 11 00:55 chain.pem -> ../../archive/sumgud.com/chain1.pem
lrwxrwxrwx 1 root root 39 Jan 11 00:55 fullchain.pem -> ../../archive/sumgud.com/fullchain1.pem
lrwxrwxrwx 1 root root 37 Jan 11 00:55 privkey.pem -> ../../archive/sumgud.com/privkey1.pem
# inside the archive (non-symlinked) folder:
-rw-r--r-- 1 root root 1805 Jan 11 00:55 cert1.pem
{
"name": "TaskApp",
"version": "0.0.1",
"description": "Use Realm Object Server's event-handling capabilities to react to new tasks and perform NLP on them.",
"main": "index.js",
"author": "Realm",
"dependencies": {
"realm": "file:realm-1.0.0-BETA-3.0-professional.tgz",
"node-wit": "^4.2.0"
}
@andkon
andkon / index.js
Created January 17, 2017 18:06
Realm Mobile Platform PE — wit.ai NLP event handling demo
'use strict';
var fs = require('fs');
var Realm = require('realm');
const {Wit, log} = require('node-wit');
// Insert the Realm admin token
// Linux: `cat /etc/realm/admin_token.base64`
Objective C:
NSLog(@"404 Error: Page not found");
Swift:
print("404 Error: Page not found")
Android:
Log.v("404 Error: Page not found")
React Native:

Keybase proof

I hereby claim:

  • I am andkon on github.
  • I am andk (https://keybase.io/andk) on keybase.
  • I have a public key ASDXBI1_LgIJDDFvttIMU5JghaFXYBKLAMnJ2ZUSJoTyawo

To claim this, I am signing this object:

"""
ADVENT OF CODE 1 2017
The captcha requires you to review a sequence of digits (your puzzle input) and find the sum of all digits that match the next digit in the list.
The list is circular, so the digit after the last digit is the first digit in the list.
For example:
1122 produces a sum of 3 (1 + 2) because the first digit (1) matches the second digit and the third digit (2) matches the fourth digit.
1111 produces 4 because each digit (all 1) matches the next.
1234 produces 0 because no digit matches the next.
# The spreadsheet consists of rows of apparently-random numbers.
# To make sure the recovery process is on the right track, they need you to calculate the spreadsheet's checksum.
# For each row, determine the difference between the largest value and the smallest value; the checksum is the sum of all of these differences.
# For example, given the following spreadsheet:
# 5 1 9 5
# 7 5 3
# 2 4 6 8
# The first row's largest and smallest values are 9 and 1, and their difference is 8.
# The second row's largest and smallest values are 7 and 3, and their difference is 4.
# The third row's difference is 6.
"""
Figure out how wide/tall the square is, and what the bottomright-most number is
Figure out how far from any corner your number is
Figure out how many layers deep the middle is
"""
import math
def third(number):
""" Returns the number of steps between number and 1 in that weird data table structure. """