Unix Epoch to ISO 8601
Time.at(1419839999).to_datetime.iso8601| #!/bin/bash | |
| # Generate a `:something-intensifies:` Slack emoji, given a reasonable image | |
| # input. I recommend grabbing an emoji from https://emojipedia.org/ | |
| set -euo pipefail | |
| # Number of frames of shaking | |
| count=10 | |
| # Max pixels to move while shaking |
| codecov: | |
| token: uuid # Your private repository token | |
| url: "http" # for Codecov Enterprise customers | |
| slug: "owner/repo" # for Codecov Enterprise customers | |
| branch: master # override the default branch | |
| bot: username # set user whom will be the consumer of oauth requests | |
| ci: # Custom CI domains if Codecov does not identify them automatically | |
| - ci.domain.com | |
| - !provider # ignore these providers when checking if CI passed | |
| # ex. You may test on Travis, Circle, and AppVeyor, but only need |
Unix Epoch to ISO 8601
Time.at(1419839999).to_datetime.iso8601| App configuration in environment variables: for and against | |
| For (some of these as per the 12 factor principles) | |
| 1) they are are easy to change between deploys without changing any code | |
| 2) unlike config files, there is little chance of them being checked | |
| into the code repo accidentally | |
| 3) unlike custom config files, or other config mechanisms such as Java |
| #!/bin/bash | |
| git diff --cached --name-status --diff-filter=ACM | awk '/\.rb$/ { print $2 }' | xargs rubocop -f s | |
| exit_code=$? | |
| if [[ $exit_code != 0 ]] ; then | |
| echo 'Your commit was rejected because Rubocop found style guide violations.' | |
| echo 'Run `rake rubocop` to test your code and inspect the offenses Rubocop' | |
| echo 'has found.' | |
| echo | |
| echo 'If you really, REALLY want to commit this code, skip your pre-commit' | |
| echo 'hooks with `git commit --no-verify`.' |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| #!/bin/bash | |
| #attach the EBS to /dev/sdf before running it | |
| #format EBS | |
| mkfs -t ext4 /dev/xvdf | |
| #copy original /var to /dev/xvdf | |
| mkdir /mnt/new | |
| mount /dev/xvdf /mnt/new | |
| cd /var |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)