Skip to content

Instantly share code, notes, and snippets.

View andkon's full-sized avatar
🤠

Andrew Konoff andkon

🤠
View GitHub Profile
{
"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 / 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
@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
## Inspiration
*[Botwiki's List of Bots](https://botwiki.org/bots/)
@andkon
andkon / README.md
Last active March 3, 2016 16:14
Camelot

excalibur: an unsupervised leader-finding process

Camelot is a big place with a lot of problems, but there's one we care about. In this first paragraph, you must explain what that problem is. Our problem is that Camelot needs a leader.

Camelot needs a solution, and excalibur is the (clever -- maybe even cheeky) name of the one thing that solves this one problem best. It sounds almost magical in how it could simply solve the problems above - problems that many people have tried to solve before. Now, you explain how it solves those problems: excalibur tells you instantly whether or not a person is that leader.

In this final introductory paragraph, you explain how excalibur works differently than most other attempted solutions. Specifically, it's hard to pull out of a stone, so only real leaders can do it.

Installation

@andkon
andkon / songsearch.py
Last active August 29, 2015 14:25
davesingskaraoke
import pyen
en = pyen.Pyen(YOUR_API_KEY)
songs = []
for row in db:
try:
res = en.get('song/search', title=row.title, artist=row.artist, bucket=["song_type"])
if len(res.get('songs')) > 0:
songs.append(res.get('songs')[0])
except pyen.PyenException:
@andkon
andkon / ABOUT
Last active August 29, 2015 14:21 — forked from Skirmantas/ABOUT
Changing django's username AND email field.
This code is a suggested answer to question asked on Stackoverflow:
http://stackoverflow.com/questions/4827965/can-i-change-djangos-auth-user-username-field-to-be-100-chars-long-without-break/
@andkon
andkon / Steps
Created May 14, 2015 17:02
ZeroPush notification setup
1. Add zeropush to heroku.
2. Get the pre-cert stuff in Apple Dev:
a) register the App ID/bundle ID
b) create a development cert
c) create a distribution cert
d) I think that's it?
3. Now get the aps certs. terminal:
pem -d
4. prod cert in terminal:
@andkon
andkon / Install instructions
Created March 14, 2015 18:12
Installing celery on django and heroku
pip install celery
heroku addons:add cloudamqp
heroku config | grep CLOUDAMQP_URL
^^ that is the URL to put in celeryconfig
@andkon
andkon / gist:6fd173142a8b8391885a
Last active August 29, 2015 14:15
iPhone screen size macros
// http://stackoverflow.com/questions/12446990/how-to-detect-iphone-5-widescreen-devices
#define IS_IPHONE ( [ [ [ UIDevice currentDevice ] model ] isEqualToString: @"iPhone" ] )
#define IS_IPHONE_4 ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.height - ( double )480 ) < DBL_EPSILON )
#define IS_IPHONE_5 ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.height - ( double )568 ) < DBL_EPSILON )
#define IS_IPHONE_6 ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.height - ( double )667 ) < DBL_EPSILON )
#define IS_IPHONE_6_PLUS ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.height - ( double )736 ) < DBL_EPSILON )