This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Plucked from the output of: deno bundle impls/ts/step3_env.ts | |
class Env { | |
outer; | |
data; | |
constructor(outer){ | |
this.outer = outer ?? null; | |
this.data = {}; | |
} | |
set(k, v) { | |
this.data[k.value] = v; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Reddit - Visually divide scrolled in content | |
// @version 1 | |
// @grant none | |
// @include https://www.reddit.com/* | |
// ==/UserScript== | |
const dividerCls = 'gm-section-divider', | |
dividerStyle = ` | |
.${dividerCls} { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage: | |
// 1. Go to https://twitter.com/favorites in a browser that supports ES6 | |
// 2. Open local equivalent of the JS console | |
// 3. Run this code. | |
function unfavourite(tweet) { | |
let $tweet = (sel) => jQuery(sel, tweet); | |
$tweet('.js-actionFavorite:visible').click(); | |
console.log( | |
"Unfavourited:\n", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Wee script to get docker into a working state. | |
* Once run one should be able to ssh without needing cmd.exe pain. | |
*/ | |
// Closer to what I expect. | |
function run(cmd) { | |
var WshShell = new ActiveXObject("WScript.Shell"), | |
oExec = WshShell.Exec(cmd); | |
// Let it run. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let [http (js/require "http")] | |
(do | |
(.listen | |
(.createServer http (fn [req res] | |
(do | |
(.writeHead res 200 #js {"Content-Type" "text/plain"}) | |
(.end res "Hello World\n")))) | |
1337 "127.0.0.1") | |
(.log js/console "Server running at http://127.0.0.1:1337/"))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
galen.core> (let [solr-doc (SolrInputDocument.)] | |
(.getFieldValue solr-doc "id") | |
solr-doc) | |
{} | |
galen.core> (let [solr-doc (SolrInputDocument.)] | |
(.addField solr-doc "id" "xyz") | |
solr-doc) | |
ClassCastException org.apache.solr.common.SolrInputField cannot be cast to java.util.Map$Entry clojure.core/key (core.clj:1482) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ruby's yaml spamming gems at .load | |
open("/home/dbrook/dev/soup-stash/app/enc/utf16_be.so.rb", O_RDONLY) = -1 ENOENT (No such file or directory) | |
open("/home/dbrook/dev/net-http-follow/lib/enc/utf16_be.so.rb", O_RDONLY) = -1 ENOENT (No such file or directory) | |
getcwd("/home/dbrook/dev/soup-stash", 200) = 28 | |
open("/home/dbrook/dev/soup-stash/lib/enc/utf16_be.so.rb", O_RDONLY) = -1 ENOENT (No such file or directory) | |
open("/home/dbrook/.rvm/gems/ruby-1.9.3-p194/gems/slop-3.4.4/lib/enc/utf16_be.so.rb", O_RDONLY) = -1 ENOENT (No such file or directory) | |
open("/home/dbrook/.rvm/gems/ruby-1.9.3-p194/gems/warden-1.2.1/lib/enc/utf16_be.so.rb", O_RDONLY) = -1 ENOENT (No such file or directory) | |
open("/home/dbrook/.rvm/gems/ruby-1.9.3-p194/gems/orm_adapter-0.4.0/lib/enc/utf16_be.so.rb", O_RDONLY) = -1 ENOENT (No such file or directory) | |
open("/home/dbrook/.rvm/gems/ruby-1.9.3-p194/gems/bcrypt-ruby-3.0.1/lib/enc/utf16_be.so.rb", O_RDONLY) = -1 ENOENT (No such file or directory) | |
open("/home/dbrook/.rvm/gems/ruby-1.9.3-p194/ge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat > var-test.rb | |
s = 'yay?' | |
def f | |
puts s | |
end | |
f | |
$ ruby var-test.rb | |
var-test.rb:3:in `f': undefined local variable or method `s' for main:Object (NameError) | |
from var-test.rb:5:in `<main>' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ perl -Mlocal::lib=local-lib5 -Mblib -d t/model_collectionofrepos.t | |
Loading DB routines from perl5db.pl version 1.33 | |
Editor support available. | |
Enter h or `h h' for help, or `man perldebug' for more help. | |
main::(t/model_collectionofrepos.t:26): | |
26: my $run_options = {}; | |
DB<1> c Gitalist::Model::CollectionOfRepos::build_per_context_instance |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ lein test | |
Testing fore-clojure.test.core | |
PFS [[[[:a :b]]] [[:c :d]] [:e :f]] | |
COND true [[:a :b]] [[[:a :b]]] | |
- PFS [[:a :b]] | |
COND true [:c :d] [[:c :d]] | |
- PFS [:c :d] | |
COND false :e [:e :f] | |
- COND false :a [:a :b] | |
FAIL in (can-partially-flatten-a-sequence) (core.clj:6) |
NewerOlder