Skip to content

Instantly share code, notes, and snippets.

fuzzy logic

Josh Goodall inopinatus

fuzzy logic
View GitHub Profile
inopinatus / table_to_csv.rb
Last active Jun 28, 2019 — forked from sandys/table_to_csv.rb
convert a html table to CSV using ruby
View table_to_csv.rb
require 'rubygems'
require 'nokogiri'
require 'csv'
f ="table.html")
doc = Nokogiri::HTML(f)"output.csv", 'w') do |csv|
doc.xpath('//table/tbody/tr').each do |row|
tarray = []
inopinatus / gist:4e936864ab3d5b79b8f050bce39b3667
Created Jun 16, 2018 — forked from steveclarke/gist:1411146
Git: Setting up a Remote Repository and Doing Initial Push
View gist:4e936864ab3d5b79b8f050bce39b3667

Setup remote repository:

mkdir my_project.git
cd my_project.git
git init --bare

On local machine:

cd my_project

View aws-slack-notify.js
console.log('Loading function');
const https = require('https');
const url = require('url');
const slack_url = '';
const slack_req_opts = url.parse(slack_url);
slack_req_opts.method = 'POST';
slack_req_opts.headers = {
'Content-Type': 'application/json'
inopinatus / eydeploy.rb
Created Aug 28, 2011 — forked from mutle/gist:1175364
no maintenance page unless we're migrating. who needs grep?
View eydeploy.rb
# no maint page unless migrations are required
def conditionally_enable_maintenance_page
super if required_downtime_stack?
if c.migrate?
info "~> testing necessity for migrations & maintenance page"
if `cd #{c.release_path} && bundle exec rake db:migrate:status`.scan(/^\s*down/).size > 0
info "~> migrations pending, maintenance page required"