Skip to content

Instantly share code, notes, and snippets.

Christopher Sexton csexton

Block or report user

Report or block csexton

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
@csexton
csexton / local-rails.diff
Created Jun 2, 2019
Terrastories local dev mode
View local-rails.diff
diff --git a/rails/Gemfile b/rails/Gemfile
index 0262b60..61d5bd8 100644
--- a/rails/Gemfile
+++ b/rails/Gemfile
@@ -6,6 +6,7 @@ ruby '2.5.1'
gem 'rails', '~> 5.2.0'
# Use mysql as the database for Active Record
gem 'mysql2', '>= 0.4.4', '< 0.6.0'
+gem 'sqlite3'
# Use Puma as the app server
@csexton
csexton / ice.md
Created Apr 29, 2019
Icebreaker Questions
View ice.md

Icebreaker Questions

  • Is it okay for your job to be really boring if it pays well?
  • Describe yourself in one word (then say “does t follow directions)
  • Are you a different person by the end of each day?
  • If a waiter leaves an item off the bill and you say nothing, is that stealing?
  • Could you ever learn too much?
  • Would you be happy if you had all you wanted?
  • If you have to talk to someone for 2 hours, what topic would you pick?
  • Can you fall asleep fast?
@csexton
csexton / compressed_public_key.rb
Created Apr 10, 2019
Attempt to generate a compressed public key from EC private key
View compressed_public_key.rb
#!/usr/bin/env ruby
require 'bundler/inline'
gemfile do
gem "openssl"
end
# See https://github.com/ruby/openssl/issues/29
def real_public_key(k)
# TODO? .point_conversion_form = :compressed
point = k.public_key
View ph.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@csexton
csexton / get_pr_from_branch.rb
Created Oct 22, 2018
Get the Pull Request number from a git branch
View get_pr_from_branch.rb
# frozen_string_literal: true
require "net/https"
require "uri"
require "json"
def find_pr(org, repo, branch)
uri = URI("https://api.github.com/repos/#{org}/#{repo}/pulls?head=#{org}:#{branch}")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
View hi
https://chrome.google.com/webstore/detail/display-kit/bcdedldcbikpjmjbllhobfaohpajojli
View log.log
2017-12-28T23:02:53.697421+00:00 app[web.2]: [remote] player_773 2017-12-28T22:55:57.232Z [Rotator Main] Current content is complete, rotating
2017-12-28T23:02:53.697436+00:00 app[web.2]: [remote] player_773 2017-12-28T22:55:57.233Z [Rotator Main] Current content is complete, rotating
2017-12-28T23:02:53.697437+00:00 app[web.2]: [remote] player_773 2017-12-28T22:55:57.233Z [Rotator Main] Current content is complete, rotating
2017-12-28T23:02:53.697438+00:00 app[web.2]: [remote] player_773 2017-12-28T22:55:57.238Z [Rotator Main] Current content is complete, rotating
2017-12-28T23:02:53.697439+00:00 app[web.2]: [remote] player_773 2017-12-28T22:55:57.239Z [Rotator Main] Current content is complete, rotating
2017-12-28T23:02:53.697439+00:00 app[web.2]: [remote] player_773 2017-12-28T22:55:57.239Z [Rotator Main] Current content is complete, rotating
2017-12-28T23:02:53.697440+00:00 app[web.2]: [remote] player_773 2017-12-28T22:55:57.243Z [Rotator Main] Current content is complete, rotating
2017-12-28T23:02:53.697
View action_cable.js
(function() {
(function() {
(function() {
var slice = [].slice;
this.ActionCable = {
INTERNAL: {
"message_types": {
"welcome": "welcome",
"ping": "ping",
@csexton
csexton / index-files.log
Last active Aug 17, 2017
ChromeOS Issue 756193
View index-files.log
localhost 5aa019f5-27e0-418e-9a62-2bb1a8d207c2 # pwd
/home/chronos/u-1134631a3449ab75f309eabbd2a6c84545e065f4/Storage/ext/bcdedldcbikpjmjbllhobfaohpajojli/def/Service Worker/CacheStorage/9a2b2fcfe89d2acf3d92909929566b9a51c251b1/5aa019f5-27e0-418e-9a62-2bb1a8d207c2
localhost 5aa019f5-27e0-418e-9a62-2bb1a8d207c2 # ls -al ./**
-rw-r--r--. 1 chronos chronos 0 Aug 9 13:33 ./d70841621db5d4b7_0
-rw-r--r--. 1 chronos chronos 0 Aug 9 13:33 ./fa5e53aa798c61ca_0
-rw-r--r--. 1 chronos chronos 0 Aug 9 13:33 ./index
./index-dir:
total 16
View get-tz.js
get_tz = ()->
lat = $('input[name=lat]').val()
lng = $('input[name=lng]').val()
time = Math.round((new Date().getTime())/1000)
$.ajax(
url:"https://maps.googleapis.com/maps/api/timezone/json?location=#{lat},#{lng}&timestamp=#{time}&sensor=false",
).done((response) ->
if(response.timeZoneId != null)
console.log(response)
alert(response.timeZoneId)
You can’t perform that action at this time.