An introduction to curl using GitHub's API
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| module ApplicationHelper | |
| # Access Levels | |
| ACCESS_LEVELS = { :private => 0, :friends => 1, :public => 2 } | |
| # Access levels i18n translation | |
| def access_levels | |
| ACCESS_LEVELS.collect{|k,v| [I18n.t("access." + k.to_s), v]} | |
| end | |
| end |
| def path_to_attachment_image(attachment) | |
| image_path("attachments/#{attachment.filename}") | |
| end |
| * Pull & rebase on master (interactively), force push to origin | |
| * Cherry pick multiple commits from another branch | |
| * |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
| if [[ $BUILD_STATUS == "success" ]] | |
| then | |
| export STATUS="success" | |
| else | |
| export STATUS="failure" | |
| fi | |
| curl "https://api.github.com/repos/justincampbell/my_repo/statuses/$GIT_COMMIT?access_token=abc123" \ | |
| -H "Content-Type: application/json" \ | |
| -X POST \ |