An introduction to curl using GitHub's API
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
### Keybase proof | |
I hereby claim: | |
* I am ianvaughan on github. | |
* I am ianvaughan (https://keybase.io/ianvaughan) on keybase. | |
* I have a public key whose fingerprint is 9B1C 3D39 19A5 B944 5E9F 0670 97B6 4C4E 5D9B 7C23 | |
To claim this, I am signing this object: |
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 |
#!/bin/bash | |
# This will tar all the subfolders within the PWD, uncomment the rm at your peril! | |
DIRS=`ls -d */` | |
for DIR in ${DIRS}; do | |
TAR_PATH=${DIR%%/} | |
echo "Processing : $TAR_PATH" | |
tar -zcvf ${TAR_PATH}.tar.gz ${TAR_PATH} > ${TAR_PATH}.tar.gz.log | |
# rm -rf ${TAR_PATH} | |
done |
#!/usr/bin/env ruby | |
class Remover | |
attr_accessor :remove_words | |
attr_accessor :error_files | |
def initialize(path = "") | |
@remove_words = ['#ifdef RIDEBUG', '#endif'] | |
@error_files = [] | |
end |
--- | |
swagger: '2.0' | |
################################################################################ | |
# API Information # | |
################################################################################ | |
info: | |
version: v1 | |
title: Instagram API | |
description: | |
# Ever wanted to force a jenkins build quickly? | |
# Put this file in your path somewhere, and chmod +x it | |
curl "http://<jenkins-server-url>/buildByToken/build?job=<job-name>&token=<token>” | |
# Replace <vars> with your own config | |
# Goto your project configure page : http://<jenkins-server-url>/job/<job-name>/configure | |
# And set “Trigger builds remotely” to <token> |
#!/bin/sh | |
# Download locations | |
# http://www.bugzilla.org/docs/3.6/en/html/modules-manual-download.html | |
# http://www.bugzilla.org/docs/3.6/en/html/modules-manual-optional.html | |
LOGFILE=install_progress.txt | |
PROCESSED_FILES_DIR=processed_files | |
mkdir -p ${PROCESSED_FILES_DIR} |