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
# Warmup – Type a regex in the box. | |
foo | |
# Anchors – You are deducted one point per character you use, and ten if you match something you shouldn't. | |
ick$ | |
# It never ends – $ not allowed | |
fu\b | |
# Ranges – The test vectors were generated by grepping /usr/dict/words. Can you tell? |
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
const letters = { | |
a: [ | |
0, 1, 1, 1, 0, | |
1, 0, 0, 0, 1, | |
1, 1, 1, 1, 1, | |
1, 0, 0, 0, 1, | |
1, 0, 0, 0, 1 | |
], | |
b: [ | |
1, 1, 1, 1, 0, |
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
const webdriver = require('selenium-webdriver'); | |
const { By, promise, until } = webdriver; | |
const firefox = require('selenium-webdriver/firefox'); | |
const binary = new firefox.Binary(firefox.Channel.NIGHTLY); | |
binary.addArguments('-headless'); | |
const capabilities = { | |
acceptInsecureCerts: true | |
}; |
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
{"docs":"css/d3~4/docker~17/dom/dom_events/eslint/express/git/html/http/javascript/moment/mongoose/node/npm/ruby~2.3/rails~4.1/sinon~4/webpack"} |
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
FROM node:latest | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
COPY package.json /usr/src/app/ | |
RUN npm install | |
COPY . /usr/src/app | |
EXPOSE 8000 | |
CMD [ "npm", "start" ] |
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
// test arrays | |
var x = [1, 2, 3]; | |
var y = [1, 3, 2]; | |
var z = [3, 2, 1]; | |
// global swap counter | |
var swaps = 0; | |
// custom sort function that counts swaps | |
function swapcount(a, b){ |
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
console.log('E-Learning Boost Activated'); | |
let initialized = false; | |
function getAnswerWindow() { | |
let win = window; | |
while (win.window.length > 0) { | |
win = win.window[1]; | |
} | |
return win; |
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
docker image rm --force $(docker image ls | awk '$1 == "<none>" {print $3}') |
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
#!/bin/sh | |
FILE_COUNT=$(git status | grep 'modified:' | wc -l) | |
if [ $FILE_COUNT -gt 100 ] ; then | |
echo "File count is 100+, skipping pre-commit validation" | |
exit 0 | |
fi | |
FAILED=0 |
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
{ | |
"Print to console": { | |
"prefix": "conl", | |
"body": [ | |
"console.log($1);" | |
], | |
"description": "Log output to console" | |
}, | |
"Print info to console": { | |
"prefix": "coni", |