Skip to content

Instantly share code, notes, and snippets.

View IanVaughan's full-sized avatar
👯‍♀️
OMG

Ian Vaughan IanVaughan

👯‍♀️
OMG
View GitHub Profile
### 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:
@IanVaughan
IanVaughan / curl.md
Last active August 29, 2015 14:28 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API

The Basics

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
@IanVaughan
IanVaughan / monitor.sh
Created July 22, 2010 12:20
monitor.sh - checks for any file changes within a folder
We couldn’t find that file to show.
@IanVaughan
IanVaughan / backup_all_subfolders.sh
Created August 16, 2010 11:14
This will tar all the subfolders within the PWD, uncomment the rm at your peril!
#!/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
@IanVaughan
IanVaughan / remove.rb
Created August 19, 2010 16:36
remove.rb - removes tons of #ifdef defines in code bases
#!/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: |
@IanVaughan
IanVaughan / trigger_ci.sh
Created April 10, 2015 08:15
Trigger Jenkins build remotely
# 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>
@IanVaughan
IanVaughan / install_perl.sh
Created October 28, 2010 15:59
Installing perl modules for Bugzilla when no internet access
#!/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}