Run a bunch of processes (e.g. Python-based web services), and bind an additional server to port 80 that encapsulates a list of "bookmark" urls.
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
<?php | |
function fixPathCase($path) { | |
if(!file_exists($path)) { | |
return false; | |
} | |
if(file_exists(strtoupper($path)) && file_exists(strtolower($path))) { | |
$parts = explode('/', $path); | |
foreach($parts as $k => $i) { | |
if($i) { | |
foreach(scandir(dirname(implode('/', array_slice($parts, 0, $k + 1)))) as $file) { |
Today, a poorly-timed tick of the "enable FileVault" box on El Capitan (OS X 10.11.1) resulted in a very dead hard drive that Disk Utility was unable to repair. Here's the basic command-line solution:
Show your CoreStorage volumes:
diskutil cs list
Delete CoreStorage logical volumes:
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 OS | |
class << self | |
def windows? | |
(/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil | |
end | |
def mac? | |
(/darwin/ =~ RUBY_PLATFORM) != nil | |
end |
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 'drb' | |
require 'pathname' | |
require 'shellwords' | |
require 'timeout' | |
module DRb | |
class Daemon | |
PATH_KEY = 'DRB_DAEMON_PATH' | |
PROTOCOL = 'drbunix:' |
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 | |
# coding: utf-8 | |
abort "This script needs Ruby 2 or later. You have #{RUBY_VERSION}." if RUBY_VERSION < '2.0.0' | |
require 'io/console' | |
require 'pathname' | |
require 'shellwords' | |
# Imitating ActiveSupport a bit here: |
I hereby claim:
- I am hx on github.
- I am hx84 (https://keybase.io/hx84) on keybase.
- I have a public key ASCGiDi2x0TpodONgBNlkk6O1kNzG441gZZW0Pud_VlRaQo
To claim this, I am signing this object:
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
// I use this with the Shortkeys Chrome plugin to navigate meetings with a single button. | |
(() => { | |
const find = cond => () => document.querySelector(cond) | |
const findButton = text => () => [...document.querySelectorAll('button,[role=button]')].find(b => b.textContent === text) | |
const steps = [ | |
// Unmute first | |
find('[aria-label*="Turn on mic"]'), |
Neil E. Pearson
- This Privacy Policy has been created because I value your right to keep your personal information private, and to comply with the National Privacy Principles. This policy sets out how I gather and disseminate your personal information.
- In this Privacy Policy, "user" refers to any users of software that I have personally released in my own name.