Skip to content

Instantly share code, notes, and snippets.

View ChaeOkay's full-sized avatar

Chae O'Keefe ChaeOkay

View GitHub Profile

#Study Notes and Coraline

Create checksum for Gemfile being bundled.

  • If the Gemfile.lock exists, look for the checksum (of the Gemfile).
    • Loading the lockfile: Bundler#locked_gems #L140
      • returns a LockfileParser object that is accessed through Bundler#locked_gems
    • Accessible through #LockfileParser@checksum, in otherwords, Bundler#locked_gems.checksum or Definition#locked_gems.checksum
  • When writing lockfile, generate checksum
    • Writing the lockfile: [Definition#to_lock #L356]
@ChaeOkay
ChaeOkay / PrePlanning.md
Last active December 22, 2016 16:58
Stay At Home Conf

#Conference Planning

##Google+ Has YouTube video watching integration.

##Gaze Needs some testing out.

##Twitch Streming YouTube not really encouraged.

@ChaeOkay
ChaeOkay / core.clj
Created October 11, 2016 01:24
Code Review - Project Euler Problem 22
(ns eulers.core
(:require [clojure.string :as str]))
(def alphabet
"Returns a LazySeq of char letters a to z."
(let [a (int \a)
z (inc (int\z))]
(map char (range a z))))
(def names
@ChaeOkay
ChaeOkay / notes.md
Last active July 9, 2016 19:46
Escaping with Cucumber

#Escaping with Cucumber

This feature test is failing:

 Scenario: diff for a multiline string with trailing newline
    Given a file named "example_spec.rb" with:
      """ruby
      RSpec.describe "a multiline string" do
        it "is like another string" do
          expected = "Chewy\nbagel."

#Goal: Escape end of line newlines in Diff message

Note: The likelyhood of this becoming a PR is pretty small.
Personal goal: Learn about working with gems, practice working on 'open source', work people outside of Healthfinch.

  • Biggest setback: Its hard to distinguish newlines that needs escaping from newlines that need rendering. Patterns for identification change between single and multiline trailing newlines.
;;----------------------------------------------------------------------
;; packages
(require 'package)
;; erbody has this
(setq package-user-dir "~/.emacs.d/elpa/")
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/") t)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(package-initialize)
# @return [Array<String>]
def gem_paths
Gem.path.flat_map { |path| Dir.glob("#{path}/gems/*") }
end
# @param [String] gem_name
# @return [Boolean]
# @raise [LoadError]
def require_gem(gem_name)
if defined?(::Bundler)
@ChaeOkay
ChaeOkay / Koamojis.txt
Last active June 14, 2022 12:43
Favorite Japanese emoticons
ʕ ཀ ᴥ ཀ ʔ
༼ ༎ຶ ෴ ༎ຶ༽
ヾ(-_- )ゞ
(༎ຶ⌑༎ຶ)
(⊙_⊙)
\(^∀^)メ(^∀^)ノ
(っ˘ڡ˘ς)
/ᐠ.ꞈ.ᐟ\
▼・ᴥ・▼
。・:*:・゚★,。・:*:・゚☆ 
@ChaeOkay
ChaeOkay / 1_ssh_to_vm.md
Last active June 8, 2016 13:15
Notes learning how to ssh into a remote vm using command line

Goal: using the command line, ssh into a remote vm that is running a linux os.

How can I try ssh-ing into a remote vm using linux distro?

Can I use Herkou? - not easily.

Can I use another web server hosting site? yes - Digital Ocean, I think droplet

Is it free? no - asked Stafford about discount code, but I haven’t done the the math and it could be inconsequential

@ChaeOkay
ChaeOkay / app.js
Created August 13, 2015 20:44
compute and insert image
$('#editor').on('keydown', e => {
if(!(e.which === 13 && e.metaKey)){ return }
let{ start, end} = editor.getSelection()
let expr = editor.getText(start, end)
docChan.push("compute_img", {expr, start, end})
console.log("cmd-enter")
})