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 replace = func => obj => obj.replace(func) | |
const map = func => obj => obj.map(func) | |
const getProp = prop => obj => obj.get(prop) | |
const allStreets = compose(map(getProp('street')), getProp('addresses')) | |
const updateUser = user => | |
allStreets(user) | |
.map(replace(/\d+/, '****')) |
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
// ==UserScript== | |
// @name Trello card title Markdown | |
// @version 0.4.0 | |
// @homepage https://gist.github.com/gorbiz/6062481 | |
// @description Add support for bold and emphasized Markdown in card titles | |
// @match https://trello.com/b/* | |
// @match http://trello.com/b/* | |
// ==/UserScript== | |
function markdownAll() { |
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
// This will open up a prompt for text to send to a console session on digital ocean | |
// Useful for long passwords | |
(function () { | |
var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split(""); | |
function f() { | |
var character = t.shift(); | |
var i=[]; | |
var code = character.charCodeAt(); | |
var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -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
# If you use bash, this technique isn't really zsh specific. Adapt as needed. | |
source ~/keychain-environment-variables.sh | |
# AWS configuration example, after doing: | |
# $ set-keychain-environment-variable AWS_ACCESS_KEY_ID | |
# provide: "AKIAYOURACCESSKEY" | |
# $ set-keychain-environment-variable AWS_SECRET_ACCESS_KEY | |
# provide: "j1/yoursupersecret/password" | |
export AWS_ACCESS_KEY_ID=$(keychain-environment-variable AWS_ACCESS_KEY_ID); | |
export AWS_SECRET_ACCESS_KEY=$(keychain-environment-variable AWS_SECRET_ACCESS_KEY); |
These are generic npm scripts that you can copy & paste into your package.json
file as-is and get access to convinience scripts to manage your Docker images all in one place.
Looking for npm scripts for AWS ECS? Go here!
Watch the video: Do More With Less JavaScript
docker pull duluca/minimal-nginx-web-server
- Documentation: https://hub.docker.com/r/duluca/minimal-nginx-web-server/
docker pull duluca/minimal-node-web-server
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
/** | |
* This short program will encrypt the user password | |
* and insert a new record into a mock database. | |
*/ | |
const Reader = require('fantasy-readers'); | |
const R = require('ramda'); | |
const crypto = require('crypto'); | |
// our mock database | |
const database = [ |
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
/** | |
* Credits | |
* @Bkucera: https://github.com/cypress-io/cypress/issues/2839#issuecomment-447012818 | |
* @Phrogz: https://stackoverflow.com/a/10730777/1556245 | |
* | |
* Usage | |
* ``` | |
* // Types "foo" and then selects "fo" | |
* cy.get('input') | |
* .type('foo') |
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 | |
# fresh-chrome | |
# | |
# Use this script on OS X to launch a new instance of Google Chrome | |
# with its own empty cache, cookies, and user configuration. | |
# | |
# The first time you run this script, it will launch a new Google | |
# Chrome instance with a permanent user-data directory, which you can | |
# customize below. Perform any initial setup you want to keep on every |
OlderNewer