Skip to content

Instantly share code, notes, and snippets.

View andrewbigger's full-sized avatar

Andrew Bigger andrewbigger

  • Zendesk
  • Melbourne, Australia
View GitHub Profile
defaults write com.apple.finder AppleShowAllFiles TRUE;killall Finder
defaults write com.apple.finder AppleShowAllFiles TRUE;killall Finder
@andrewbigger
andrewbigger / Repo Info.md
Last active May 3, 2017 11:47
Report on Github repositories

Repo Info

Quick and dirty CSV report of a user/organisation's Github repos.

What it does

This simply creates a CSV based on the API response from Github. The values retrieved are specified in the HEADERS array, and if you feel you would like to add any items to the list, you'll find the api documentation here

Requirements

  • ruby 2.3
  • rubygems
@andrewbigger
andrewbigger / node_parent_check.rb
Last active August 29, 2015 14:04
CXML Node Parent Checker
#!/usr/bin/env ruby
def check doc, options
doc.css(options[:query]).each do |node|
unless node.parent.name == options[:parent]
puts "#{options[:for]} element not wrapped in #{options[:parent]} at line #{node.line}" unless node.parent.name == options[:or]
end
@andrewbigger
andrewbigger / magick_sample_images_to_pixels.sh
Last active August 29, 2015 14:04
Sample Images to number of pixels using ImageMagick
#!/bin/bash
dir=$1
let max='1900000'
cd $dir
for file in `ls $dir`
do
@andrewbigger
andrewbigger / osx_show_hidden_files.sh
Created July 25, 2014 02:09
OSX: Show/Hide hidden files
#!/bin/bash
is_shown=$(defaults read com.apple.finder AppleShowAllFiles)
if [ $is_shown != "YES" ]
then
defaults write com.apple.finder AppleShowAllFiles YES
else
defaults write com.apple.finder AppleShowAllFiles NO
fi
@andrewbigger
andrewbigger / nested_node_detect.rb
Created July 25, 2014 02:05
Detect Nested CXML P or C Nodes
#!/usr/bin/env ruby
require 'rubygems'
require 'optparse'
require 'nokogiri'
options = { :log => $stdout,
:verbose => false
}