See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
require 'fileutils' | |
# Define your source and destination directories | |
source_dir = 'content/blog' | |
posts_destination_dir = 'src/_posts' | |
images_destination_dir = 'src/images' |
watchman watch-del-all && rm -rf node_modules/ && yarn cache clean && yarn install && yarn start -- --reset-cache |
#!/usr/bin/env bash | |
# based on https://gist.github.com/schacon/942899 | |
# list | |
git branch -r --merged | grep origin | grep -v '>' | grep -v master\* | grep -v release-\* | xargs -L1 | |
# delete | |
git branch -r --merged | grep origin | grep -v '>' | grep -v master\* | grep -v release-\* | xargs -L1 | awk '{sub(/origin\//,"");print}' | xargs git push origin --delete |
If you get error like this:
Running via Spring preloader in process 7662
/Users/zulh/.rvm/gems/ruby-2.3.1@useradmin/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require': dlopen(/Users/zulh/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/x86_64-darwin15/readline.bundle, 9): Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib (LoadError)
Referenced from: /Users/zulh/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/x86_64-darwin15/readline.bundle
Reason: image not found - /Users/zulh/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/x86_64-darwin15/readline.bundle
from /Users/zulh/.rvm/gems/ruby-2.3.1@useradmin/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/zulh/.rvm/gems/ruby-2.3.1@useradmin/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/zulh/.rvm/gems/ruby-2.3.1@useradmin/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
if ( | |
process.env.NODE_ENV === 'production' && | |
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ && | |
Object.keys(window.__REACT_DEVTOOLS_GLOBAL_HOOK__._renderers).length | |
) { | |
window.__REACT_DEVTOOLS_GLOBAL_HOOK__._renderers = {} | |
} |
This script is no longer required with Docker for Mac which includes an option to run Docker at startup and doesn't use docker-machine
to administer the local Docker engine.
docker-machine create --driver virtualbox default
(this is the default with Docker toolkit).An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
Includes HTTP-Header information in the output