Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

David Joerg dsjoerg

🎯
Focusing
Block or report user

Report or block dsjoerg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:e0d829a7c3273cfd4b3692eaf6e852ed
Looking forward from 1994:
* before looking 25 years forward from now, let's look 25 years forward from 1994. how predictable were the technological and innovative things that happened in the past 25 years?
* are there things that happened that you feel weren't inevitable, that could have gone another way? are we on the best timeline? the worst?
* are there things that 25 years ago you thought would have happened, but didn't?
Looking forward from 2019:
* William Gibson says "The future is already here — it's just not very evenly distributed". Where, or in who, do you see furthest into the future?
View gist:a82d14494af1485eb22ac55854a6f59f
was:ninthpawn-django david$ dig @dns1.registrar-servers.com hillarybnb.com ANY
dig @dns1.registrar-servers.com hillarybnb.com ANY
; <<>> DiG 9.8.3-P1 <<>> @dns1.registrar-servers.com hillarybnb.com ANY
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47169
;; flags: qr aa rd; QUERY: 1, ANSWER: 10, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available
@dsjoerg
dsjoerg / file
Created Aug 1, 2016
freedom_public
View file
{"0.7098366454378084":"-----BEGIN PGP PUBLIC KEY BLOCK-----\r\nCharset: UTF-8\r\n\r\nxv8AAABSBAAAAAATCCqGSM49AwEHAgME8E27XU25miaxHCrN6IGlpfAtVhyvao6h\r\nuMl6RAUNuwA0ozxzNiG7WQ4R+Nz4unyQwMOKR5fy2fCMxb12Ok7xF83/AAAACDxn\r\naXRodWI+wv8AAACOBBATCABA/wAAAAWCV5+hcf8AAAACiwn/AAAACZA2szLXV9Xw\r\na/8AAAAFlQgJCgv/AAAABJYDAQL/AAAAApsD/wAAAAKeAQAAh0sA/jyxOT+EvOcg\r\nW8rUU8sZuM9rS83Ov423SZ7ciL3DmIhMAP9lCRoFn0E9U4bxv+SMBxsT9uRHpE/G\r\ntH8TnylZLC3yls7/AAAAVgQAAAAAEggqhkjOPQMBBwIDBIQa8jmGS13YKSAV3BKC\r\nY/jT6LvXh+MwbpHa2539nnKFiNxXe0V30Hf8DJ59mloLroov/xHO8xN2rky/Dpss\r\nQyYDAQgHwv8AAABtBBgTCAAf/wAAAAWCV5+hcf8AAAAJkDazMtdX1fBr/wAAAAKb\r\nDAAA1jEA/jKiAfHChulxvF1sbIL4xxHoYJ1S0sPWuxMNzVE+97WYAPsELSzavNhq\r\nIGPCLotCGyVrwZbYc3ij02DXYM6I0md9Qg==\r\n=bHTM\r\n-----END PGP PUBLIC KEY BLOCK-----\r\n"}
View gist:bd23f72fd32900d9aac36eff7c309792
was:sc2reader david$ sc2reader/scripts/sc2replayer.py test_replays/3.4.0/issueYY.SC2Replay
sc2reader/scripts/sc2replayer.py test_replays/3.4.0/issueYY.SC2Replay
Release 3.4.0.44401
1v1 on Apotheosis LE at 2016-07-13 00:52:13
Team 1: Player 1 - bacon (Protoss)
Player 1 - bacon (Protoss)
Team 2: Player 2 - FlyingCake (Terran)
Player 2 - FlyingCake (Terran)
View gist:5ef6312c5eaa90eaf629fd9038c88ca1
ERROR: test_34 (sc2parse.tests.SC2ReaderToEsdbTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/david/Dropbox/Programming/ggpyjobs/sc2parse/tests.py", line 485, in test_34
replay = self.get_parsed_replay(34)
File "/Users/david/Dropbox/Programming/ggpyjobs/sc2parse/tests.py", line 46, in get_parsed_replay
replay = ggfactory.load_replay(replayfile)
File "/Users/david/Dropbox/Programming/ggpyjobs/src/sc2reader/sc2reader/factories/sc2factory.py", line 85, in load_replay
return self.load(Replay, source, options, **new_options)
File "/Users/david/Dropbox/Programming/ggpyjobs/src/sc2reader/sc2reader/factories/sc2factory.py", line 137, in load
View gist:59fa97e50cd0bd5ca32af5cd3d72cb90
Traceback (most recent call last):
File "/Users/david/Dropbox/Programming/ggpyjobs/sc2parse/tests.py", line 485, in test_34
replay = self.get_parsed_replay(34)
File "/Users/david/Dropbox/Programming/ggpyjobs/sc2parse/tests.py", line 46, in get_parsed_replay
replay = ggfactory.load_replay(replayfile)
File "/Users/david/Dropbox/Programming/esdb/vendor/ggpyjobs/src/sc2reader/sc2reader/factories/sc2factory.py", line 85, in load_replay
return self.load(Replay, source, options, **new_options)
File "/Users/david/Dropbox/Programming/esdb/vendor/ggpyjobs/src/sc2reader/sc2reader/factories/sc2factory.py", line 137, in load
return self._load(cls, resource, filename=filename, options=options)
File "/Users/david/Dropbox/Programming/esdb/vendor/ggpyjobs/src/sc2reader/sc2reader/factories/sc2factory.py", line 146, in _load
View gist:dafc821e27d1c7b4bfa821aef8529566
was:Programming david$ git clone git@github.com:ggtracker/ggtrackerstack.git
git clone git@github.com:ggtracker/ggtrackerstack.git
Cloning into 'ggtrackerstack'...
remote: Counting objects: 67, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 67 (delta 1), reused 0 (delta 0), pack-reused 61
Receiving objects: 100% (67/67), 12.02 KiB | 0 bytes/s, done.
Resolving deltas: 100% (29/29), done.
Checking connectivity... done.
was:Programming david$ cd ggtrackerstack
View gist:74f207df77671a3df66ebb57835ddb9b
INSERT INTO `esdb_identities` (`id`, `type`, `name`, `provider_id`, `provider_ident`, `gateway`, `subregion`, `bnet_id`, `character_code`, `most_played_race`, `highest_league_1v1`, `highest_team_league`, `highest_league_2v2`, `highest_league_3v3`, `highest_league_4v4`, `current_league_1v1`, `current_league_2v2`, `current_league_3v3`, `current_league_4v4`, `achievement_points`, `season_games`, `career_games`, `most_played`, `portrait`, `profile_url`, `last_scraped_at`, `scrape_job_id`, `highest_league`, `average_league`, `avg_apm`, `avg_wpm`, `matches_count`, `highest_league_rank`, `state`, `status`, `seconds_played_sum`, `current_rank_1v1`, `current_rank_2v2`, `current_rank_3v3`, `current_rank_4v4`, `current_highest_type`, `current_highest_league`, `current_highest_leaguerank`, `last_s2gsq_at`, `last_replay_played_at`, `s2gs_priority`, `last_summary_seen_at`, `pops_since_summary_seen`, `last_replay_uploaded_at`, `name_valid_at`, `name_source`, `last_stats_refresh`, `blocked`)
VALUES
(41218, 'ESDB::Sc2::Ident
View gist:73b181319affc85d8d5b0c2e8970f862
was:~ david$ wget 37.187.205.99
--2016-04-16 21:52:57-- http://37.187.205.99/
Connecting to 37.187.205.99:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://lichess.org/ [following]
--2016-04-16 21:52:58-- http://lichess.org/
Resolving lichess.org... 37.187.205.99
Reusing existing connection to 37.187.205.99:80.
HTTP request sent, awaiting response... 303 See Other
Location: http://en.lichess.org/ [following]
View curfew_computation.rb
# returns value in decimal hours (e.g. 23.5 = 11:30pm)
def self.compute_curfew(user, verbose = false)
targetHoursSleep = 7.5
targetMinutesSleep = targetHoursSleep * 60
minutesSleptType = ObservationType.find_by!(name: "minutes_slept_jawbone")
curfewType = ObservationType.find_by!(name: "curfew")
lastSleepObservation = DailyObservation.retrieve(minutesSleptType, { beforeDate: Date.today, user: user }).last
You can’t perform that action at this time.