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
| #!/bin/bash | |
| # signals bash to stop execution on any fail | |
| set -e | |
| # if variable not defined | |
| if [[ -z "$BACKUP_FILE" ]]; then | |
| ... | |
| fi |
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
| URL="http://stackoverflow.com/" | |
| # store the whole response with the status at the and | |
| HTTP_RESPONSE=$(curl --silent --write-out "HTTPSTATUS:%{http_code}" -X POST $URL) | |
| # extract the body | |
| HTTP_BODY=$(echo $HTTP_RESPONSE | sed -e 's/HTTPSTATUS\:.*//g') | |
| # extract the status | |
| HTTP_STATUS=$(echo $HTTP_RESPONSE | tr -d '\n' | sed -e 's/.*HTTPSTATUS://') |
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
| # Version key/value should be on his own line | |
| PACKAGE_VERSION=$(cat package.json \ | |
| | grep version \ | |
| | head -1 \ | |
| | awk -F: '{ print $2 }' \ | |
| | sed 's/[ ",]//g') | |
| echo $PACKAGE_VERSION |
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
| alias c='docker-compose' | |
| alias cb='docker-compose build' | |
| alias cup='docker-compose up' | |
| alias cr='docker-compose run --service-ports --rm' | |
| alias crl='docker-compose run --service-ports --rm local' | |
| alias crd='docker-compose run --service-ports --rm develop' | |
| alias crt='docker-compose run --rm test' | |
| alias crp='docker-compose run --rm provision' | |
| alias crci='docker-compose run --rm ci' | |
| alias crwt='docker-compose run --rm watchtest' |
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
| <FormattedHTMLMessage | |
| id="news-publish.not-allowed.html" | |
| values={{ emailSupport: support.email }} | |
| defaultMessage={"Please contact <a href=\"mailto:{emailSupport}\">support</a>."} /> |
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
| -- enable dblink support | |
| CREATE EXTENSION dblink; | |
| -- create the connection | |
| SELECT dblink_connect('myconn', 'dbname=tracking-service'); | |
| -- then use the connection | |
| SELECT "oauthId" | |
| FROM "56_profile" local | |
| INNER JOIN dblink('myconn','SELECT DISTINCT user_id FROM "event"') |
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
| func connectionURIFromEnvConfig() string { | |
| errMsg := "no valid connection string provided" | |
| connConfig, err := url.Parse(os.Getenv("DB_PORT")) | |
| if err != nil { | |
| log.Fatalln(errMsg) | |
| } | |
| dbHost, dbPort, err := net.SplitHostPort(connConfig.Host) | |
| if err != nil { |
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
| brew install dnsmasq | |
| mkdir -pv $(brew --prefix)/etc/ | |
| echo 'address=/.dev/127.0.0.1' > $(brew --prefix)/etc/dnsmasq.conf | |
| sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons | |
| sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
| sudo mkdir -v /etc/resolver | |
| sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/dev' |
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
| μ sqlectron/sqlectron-gui master ❯ npm run dist | |
| > @ dist /Users/maxcnunes/Development/sqlectron/sqlectron-gui | |
| > npm run compile && build --arch all | |
| > @ compile /Users/maxcnunes/Development/sqlectron/sqlectron-gui | |
| > rimraf app/out && cross-env NODE_ENV=production babel-node scripts/compile.js -v | |
| > cleaning old distribution files |
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
| Code move event for unknown code: 0x3c010c699080 | |
| Code move event for unknown code: 0x3c010c69b9c0 | |
| Code move event for unknown code: 0x3c010c5729a0 | |
| Code move event for unknown code: 0x3c010c57daa0 | |
| Code move event for unknown code: 0x3c010c5c8f00 | |
| Code move event for unknown code: 0x3c010c5d90a0 | |
| Statistical profiling result from v8.log, (22371 ticks, 0 unaccounted, 0 excluded). | |
| [Shared libraries]: | |
| ticks total nonlib name |