Skip to content

Instantly share code, notes, and snippets.

View TheLonelyGhost's full-sized avatar

David Alexander TheLonelyGhost

View GitHub Profile
@TheLonelyGhost
TheLonelyGhost / css_path.js
Last active July 29, 2016 13:23 — forked from asfaltboy/css_path.js
Get Element CSS Selector
/*
* Copyright (C) 2015 Pavel Savshenko
* Copyright (C) 2011 Google Inc. All rights reserved.
* Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
* Copyright (C) 2009 Joseph Pecoraro
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Original Version: 1.4, 2016-01-16
# Tweaked based on personal preferences for @alirobe 2016-03-23 - v1.4.1
# NOTE: MAKE SURE YOU READ THIS SCRIPT CAREFULLY BEFORE RUNNING IT + ADJUST COMMENTING AS APPROPRIATE
# This script will reboot your machine when completed.
##########
# Ask for elevated permissions if required
@TheLonelyGhost
TheLonelyGhost / 4.2.5.rb
Last active February 15, 2016 15:29
Rails bug #23689
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', '4.2.5'
@TheLonelyGhost
TheLonelyGhost / ec2_firewall_rules.rb
Last active October 6, 2015 20:44
Export EC2 Security Group firewall settings based on the private key chosen to build the instance
#!/usr/bin/env ruby
require 'bundler/inline'
gemfile true do
source 'https://rubygems.org'
gem 'aws-sdk', '~> 2'
end
require 'aws-sdk'
require 'csv'