Skip to content

Instantly share code, notes, and snippets.

View bendyorke's full-sized avatar

Ben Yorke bendyorke

View GitHub Profile
bendyorke /
Last active March 12, 2021 14:25
Setting up a new mac
bendyorke / original.txt
Last active April 10, 2020 12:14
Sourcegraph Library Discussion
- find the column and line number related to where the cursor is
- find the token underneath the cursor using some sort language parsing
- leverage the syntax highlighting to determine tokens (individual HTML Elements)
- this would help with the onTokenEnter and onTokenLeave priciples
- make API call to get the hover contents back from the api
- so long as the cursor stays over the current token, show a loading indicator
- it can't jusst on cursor move, onTokenEnter
- onTokenLeave stop the request/ignore the request
- once you get the content back, replace the loading indicator with the content
- you could cache the content in case the user hovers back over the same token in a given session
bendyorke /
Created September 12, 2019 05:52

Keybase proof

I hereby claim:

  • I am bendyorke on github.
  • I am bendy ( on keybase.
  • I have a public key ASCZaxEmvkro519HaeloPFxmB3JIGgUQhCT1J88GeCLDxgo

To claim this, I am signing this object:

bendyorke / benchmark.rb
Created May 20, 2014 06:54
Benchmarking sampling of a hash
require "benchmark"
n = 10000
arr = (1..1000).to_a
zip = arr
hash = Hash[zip] do |x|"%-30s" %["sampling array"]) { n.times do
bendyorke /
Last active July 3, 2016 16:39
CatFacts code for
wt cron schedule --name cat-facts \
--param to=<ENEMY_PHONE_NUMBER> \
--secret SID=<TWILIO_SID> \
bendyorke / zero_to_mega_clojure.clj
Last active May 18, 2016 05:27
Playing around with zero_to_clojure.clj
#! /usr/bin/env boot
(set-env! :dependencies '[[compojure "1.5.0"]
[http-kit "2.1.8"]])
;; You can pass as many packages as you want to require,
;; so no need to invoke it twice!
(require '[compojure.core :refer [defroutes GET POST]]
'[org.httpkit.server :refer [run-server]])
(defn greet [greetee]
bendyorke / zero_to_clojure.clj
Last active May 13, 2016 21:11
Fully featured clojure web server in 10 lines of code
#! /usr/bin/env boot
(set-env! :dependencies '[[compojure "1.5.0"]
[http-kit "2.1.8"]])
(require '[compojure.core :refer [defroutes GET]])
(require '[org.httpkit.server :refer [run-server]])
(defroutes routes
(GET "/" [] "Hello World!"))
bendyorke / gist:6059481
Created July 23, 2013 02:46
<form action="/${1:url}" method="post">
<input type="${2:text}" name="$3">
<input type="${4:password}" name="$5">
${6:<input type="submit" value="Submit">}
<scope>text.html - ruby</scope>
bendyorke / zoo.js
Last active December 19, 2015 07:29 — forked from dbc-challenges/zoo.js
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
var Zoo = {
animals: {},
init: function(animalInput) {
for(index in animals) {
this.animals[animalInput[index].name] = animalInput[index].legs;
bendyorke / index.html
Last active December 19, 2015 07:19 — forked from dbc-challenges/index.html
DBC Phase 2 Practice Assessment Part 3
<!doctype html>
<link rel="stylesheet" href="">
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href=",400,600,700,800">
<link rel="stylesheet" href=",900">
<link rel="stylesheet" href="">