This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'rubygems/package' | |
require 'zlib' | |
require 'fileutils' | |
require 'pathname' | |
def unpack filename, output | |
output_path = Pathname.new output | |
Zlib::GzipReader.open filename do |gz| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require "ffi-xattr" | |
require "cfpropertylist" | |
require "pry" | |
class Tag | |
COLORS = { | |
white: 0, | |
gray: 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require "rubygems" | |
require "bundler/setup" | |
Bundler.require :default | |
class DODNS | |
TOKEN = ENV["DO_TOKEN"].freeze | |
DNS_FILE_LOC = Pathname.new("data_bags/dns").freeze |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"header": { | |
"Name": "WorkDox", | |
"Layout": "Ashby1", | |
"Base": "Blank", | |
"Version": "0.1", | |
"Author": "JoshAshby 2016", | |
"KLL": "0.3c", | |
"Date": "2015-09-12", | |
"Generator": "KIICONF 0.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
require 'net/https' | |
require 'nokogiri' | |
uri = URI('https://hope.net/schedule.html') | |
http = Net::HTTP.new(uri.host, uri.port) | |
http.use_ssl = true | |
http.verify_mode = OpenSSL::SSL::VERIFY_PEER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MylarLogger | |
attr_accessor :logger, :log, :saved_lines | |
def initialize logger, saved_lines: 20 | |
@logger, @log, @saved_lines = logger, [], saved_lines | |
end | |
def method_missing name, *args, &block | |
@log.push({ method: name, args: args }) | |
@log.shift if @log.length > @saved_lines |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##################### Elasticsearch Configuration Example ##################### | |
# This file contains an overview of various configuration settings, | |
# targeted at operations staff. Application developers should | |
# consult the guide at <http://elasticsearch.org/guide>. | |
# | |
# The installation procedure is covered at | |
# <http://elasticsearch.org/guide/en/elasticsearch/reference/current/setup.html>. | |
# | |
# Elasticsearch comes with reasonable defaults for most settings, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'washbullet' | |
require 'thor' | |
class CommandCLI < Thor | |
desc "pushbullet COMMAND", "Runs the given COMMAND and sends a pushbullet notification if the exit status is non-zero" | |
long_desc <<-DESC | |
Runs the given command and sends a pushbullet notification if the exit status is non-zero. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Exceptatron | |
class Middleware | |
def initialize app | |
@app = app | |
end | |
def call request | |
raise StandardError.new "Bubbling down" | |
code, headers, body = @app.call request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$output = $("#output") | |
window.editor = new Quill('#editor', { | |
modules: { | |
'toolbar': { container: '#toolbar' }, | |
'link-tooltip': true | |
}, | |
theme: 'snow' | |
}) |
NewerOlder