To install UniFi Controller on FreeNAS 9.10-STABLE run the following command within a new FreeNAS Jail.
curl -sL "https://gist.githubusercontent.com/mattrude/27db653a5c8a09fc419d/raw/unifi-freenas-install.sh" | csh
// ==UserScript== | |
// @name noVNC Paste for Proxmox | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2a | |
// @description Pastes text into a noVNC window (for use with Proxmox specifically) | |
// @author Chester Enright | |
// @match https://* | |
// @include /^.*novnc.*/ | |
// @require http://code.jquery.com/jquery-3.3.1.min.js | |
// @grant none |
To install UniFi Controller on FreeNAS 9.10-STABLE run the following command within a new FreeNAS Jail.
curl -sL "https://gist.githubusercontent.com/mattrude/27db653a5c8a09fc419d/raw/unifi-freenas-install.sh" | csh
gem install larch | |
larch --from imaps://imap.gmail.com --to imaps://imap.gmail.com --from-folder '[Gmail]/All Mail' --to-folder '[Gmail]/All Mail' |
require 'rack/util/file' | |
path = ARGV.shift || Dir.pwd | |
run Rack::File.new(path, { 'Accept-Ranges' => 'bytes'}) |
require 'activesupport' # assuming this is already loaded by some dependency.. | |
require 'json' | |
if defined?(ActiveSupport::JSON) | |
[Object, Array, FalseClass, Float, Hash, Integer, NilClass, String, TrueClass].each do |klass| | |
klass.class_eval do | |
def to_json(*args) | |
super(args) | |
end | |
end |
# heavily based on Masao Mutoh's gettext String interpolation extension | |
# http://github.com/mutoh/gettext/blob/f6566738b981fe0952548c421042ad1e0cdfb31e/lib/gettext/core_ext/string.rb | |
module I18n | |
INTERPOLATION_PATTERN = Regexp.union( | |
/%%/, | |
/%\{(\w+)\}/, # matches placeholders like "%{foo}" | |
/%<(\w+)>(.*?\d*\.?\d*[bBdiouxXeEfgGcps])/ # matches placeholders like "%<foo>.d" | |
) |
$LOAD_PATH << './lib' | |
require 'i18n.rb' | |
class Backend < I18n::Backend::Simple | |
include I18n::Backend::Metadata | |
end | |
# if string.respond_to?(:translation_metadata) |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
require 'jruby' | |
module Serialize | |
def self.serialize(obj) | |
baos = java.io.ByteArrayOutputStream.new | |
oos = java.io.ObjectOutputStream.new(baos) | |
oos.write_object(JRuby.reference(obj)) | |
oos.close | |
# Convert any YouTube video into an audio file you can listen to on the go, using: | |
# http://rg3.github.com/youtube-dl/ | |
{ ~ } > brew install ffmpeg | |
{ ~ } > wget https://raw.github.com/rg3/youtube-dl/2012.02.27/youtube-dl | |
{ ~ } > chmod u+x youtube-dl | |
# Pick which video format you want to download.. (use any YT video link) | |
{ ~ } > ./youtube-dl -s -F http://www.youtube.com/watch?v=vT1KmTQ-1Os |