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
open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir="/tmp/chrome_dev_test" --disable-web-security |
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
echo $(date +'[%F %T %Z]') |
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
// set `wsse-user` and `wsse-secret` variables in | |
// your Postman environment | |
const user = pm.environment.get("wsse-user"); | |
const secret = pm.environment.get("wsse-secret"); | |
const header = getWsseHeader(user, secret); | |
pm.environment.set("wsse-header", header); | |
function sha1hex(str) { |
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
// https://www.codewars.com/kata/simple-time-difference/train/javascript | |
function solve(arr){ | |
return arr.map(convertTimeToMinutes).sort((a, b) => a - b); | |
// const day = convertTimeToMinutes('24:00') | |
// const firstTime = convertTimeToMinutes(arr[0]) | |
// const nextDayTime = firstTime + day | |
// return convertMinutesToTime(nextDayTime - firstTime - 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
swagger: '2.0' | |
info: | |
title: HTTP-proxy API | |
description: Example HTTP-proxy API | |
version: '1.0.0' | |
schemes: | |
- https | |
produces: | |
- application/json | |
paths: |
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/bash | |
# This script will create a git-tag if version in package.json changes | |
git config --global user.email "[email protected]" | |
git config --global user.name "Travis CI" | |
VERSION=$(node -pe "require('./package.json').version") | |
export PACKAGE_VERSION="v${VERSION}" | |
export LAST_TAG=$(git tag --sort version:refname | tail -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
echo '{something+}' | sed -E 's/\{([A-Za-z0-9\-]+)\+\}/{\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
sed -i '' 's/replace_this/with_that/g' file |
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
(object && object.key) |
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 works, because `proc === x` is same as `proc.call(x)` | |
# weird syntactic choice makes a great job in case statements | |
def say_something_about(number) | |
greater_then_10 = -> (number) { number > 10 } | |
equals_15 = -> (number) { number === 15 } | |
case number | |
when greater_then_10 | |
puts "it's greater then 10!" |
NewerOlder