This file contains 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
#!/usr/bin/env bash | |
EXAMPLE=$(cat <<EOF | |
(macrolet ((execute-lambda-at-compile-time-a (l) | |
\`(quote | |
,(handler-case (funcall l) | |
(error (e) (format nil "~a" e))))) | |
(execute-lambda-at-compile-time-b (l) | |
\`(quote |
This file contains 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
#!/usr/bin/env bash | |
EXAMPLE=$(cat <<EOF | |
(macrolet ((execute-lambda-at-compile-time-a (l) \`(quote ,(funcall l))) | |
(execute-lambda-at-compile-time-b (l) \`(quote ,(funcall (eval l)))) | |
(run-example (symbol) | |
\`(handler-case (,symbol (lambda () 'hello)) | |
(error (e) (format nil "~a" e))))) | |
(print (list | |
(run-example funcall) |
This file contains 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
(defmacro code-generator-caller-1 (code-generator) | |
`(quote ,(funcall code-generator))) | |
(defmacro code-generator-caller-2 (code-generator) | |
`(quote ,(funcall (eval code-generator)))) | |
(defmacro run-example (symbol) | |
`(,symbol (lambda () 'hello))) | |
;; (run-example funcall) |
This file contains 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
#!/usr/bin/env node | |
(function(){ | |
function aFunction(){ | |
var a = "A1"; | |
let b = "B1"; | |
console.log(`Inside function, BEFORE variable assignments in "inner" lexical scope:\n\t<a: ${a}, b: ${b}>`); | |
// Prints: | |
// Inside function, BEFORE variable assignments in "inner" lexical scope: |
This file contains 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
#!/usr/bin/env node | |
function testInputs(f, ...inputs){ | |
inputs.forEach( i => | |
console.log(`${i} becomes: ${f(i)}`) | |
); | |
} | |
// Quick and easy solution. | |
// Problems: |
This file contains 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
I’ve got a really strange problem that I’ve been trying to get to the bottom of for three days and I’m really stuck. Posting here hoping someone has an idea of where I could look. | |
I’ve got a Vagrantfile that provisions a minimal ubuntu VM to use as a local Sandbox to test what follows (the production target is EC2 instance in AWS). | |
I’ve got some Ansible code that I run against that VM to configure it. | |
I’ve got a script that runs Ansible via a docker container (so that I — and my coworkers — don’t need to install/mange Ansible on our machines.) | |
Ansible installs (among other things) Jenkins onto the VM. It is preconfigured with all the credentials it needs (to pull from git, to connect to VPNS) and a few default pipelines. |
This file contains 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
# "checkout". Shows you local git branches and prompts you to select one by ordinal | |
co() { | |
echo "Which branch do you want to switch to?" | |
git branch | cat -n | |
read "NUM?> " | |
git checkout $(git branch | head -n $NUM | tail -n 1) | |
} |
This file contains 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
// Run this file by typing this at the terminal while in the directory you saved this file to: | |
// (assuming you called the file 'main.js' | |
// node main.js | |
/********************************************************************************* | |
* | |
* PART I: Setup | |
* | |
*********************************************************************************/ |
This file contains 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
GVM has been detected on your system... | |
This update will upgrade GVM to SDKMAN! | |
Do you want to continue with the upgrade? (Y/n)y | |
Thanks for upgrading to... | |
This file contains 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
#!/usr/bin/perl | |
my $letters = shift or die "Specify letters"; | |
my @letters = split //, $letters; | |
my $size = shift or die "Specify count"; | |
open(DICT, "</usr/share/dict/words"); | |
my $words = {}; |
NewerOlder