Skip to content

Instantly share code, notes, and snippets.

View bluet's full-sized avatar
🏠
Working from home

BlueT - Matthew Lien - 練喆明 bluet

🏠
Working from home
View GitHub Profile
# Add "get_board_info" helper
$app->helper(
get_board_info => sub {
my $c = shift;
my $data_id = shift;
my @keys = @_;
my $aecv = AE::cv;
my %data;
$aecv->begin (sub { shift->send(\%data) }); # Outer CV
-20:14-wrapper:: ::wrapper-init-obj
-20:14-:: ::true
-20:14-wrapper:: ::type=onvif
-20:14-:: ::{ type: 'onvif',
model: undefined,
host: '163.22.32.62',
port: '80',
dataport: undefined,
user: 'root',
passwd: '9999',
@bluet
bluet / servo build log
Created March 14, 2015 18:41
servo build log
Compiling servo v0.0.1 (file:///home/matthew/workspace/servo/components/servo)
error: linking with `cc` failed: exit code: 1
note: "cc" '"-Wl,--as-needed"' '"-m64"' '"-L"' '"/home/matthew/workspace/servo/.servo/rust/80627cd3cc4099b76cb2fb26ebe2f2f8a6c2335e/rustc-1.0.0-dev-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib"' '"-o"' '"/home/matthew/workspace/servo/components/servo/target/servo"' '"/home/matthew/workspace/servo/components/servo/target/servo.o"' '"-Wl,--whole-archive"' '"-lmorestack"' '"-Wl,--no-whole-archive"' '"-Wl,--gc-sections"' '"-pie"' '"-nodefaultlibs"' '"/home/matthew/workspace/servo/components/servo/target/libservo-ca5d83ea06517e97.rlib"' '"/home/matthew/workspace/servo/components/servo/target/deps/libglutin_app-d734f4e63691f799.rlib"' '"/home/matthew/workspace/servo/components/servo/target/deps/libegl-4afa4a11c31935a5.rlib"' '"/home/matthew/workspace/servo/components/servo/target/deps/libglutin-227dda0516042855.rlib"' '"/home/matthew/workspace/servo/components/servo/ta
@bluet
bluet / servo build log --verbose
Created March 14, 2015 18:53
servo build log --verbose
Fresh mozjs-sys v0.0.0 (https://github.com/servo/mozjs#056e1d95)
Fresh matches v0.1.2
Fresh unicase v0.0.4
Fresh gcc v0.1.7
Fresh gcc v0.1.7 (https://github.com/alexcrichton/gcc-rs#016cc159)
Fresh egl v0.1.0 (https://github.com/servo/rust-egl#328e79b6)
Fresh khronos_api v0.0.5
Fresh plugins v0.0.1 (file:///home/matthew/workspace/servo/components/servo)
Fresh rustc-serialize v0.2.12
Fresh png-sys v1.6.16 (https://github.com/servo/rust-png#687f1034)

Keybase proof

I hereby claim:

  • I am bluet on github.
  • I am bluet (https://keybase.io/bluet) on keybase.
  • I have a public key ASAlSJONdhClnJ9ORFkg21itIdKooFbt6yEx_o9g5778Jgo

To claim this, I am signing this object:

{ Winters: 6.446,
Rasmussen: 4.8934,
Levy: 4.8123,
Miriam: 4.8345,
Brenda: 4.8083,
Elma: 4.8371,
Clarice: 4.5523,
Alana: 4.3095,
Patton: 5.2737,
Scott: 4.9223,
# Replace [YOUR_DOMAIN_NAME] by your real domain
server.modules += ( "mod_setenv" ) # For HSTS
$SERVER["socket"] == "0.0.0.0:443" {
ssl.engine = "enable"
ssl.pemfile = "/etc/letsencrypt/live/[YOUR_DOMAIN_NAME]/combined.pem"
ssl.ca-file = "/etc/letsencrypt/live/[YOUR_DOMAIN_NAME]/fullchain.pem"
ssl.dh-file = "/etc/ssl/certs/dhparam.pem"
@bluet
bluet / postgres_queries_and_commands.sql
Created May 17, 2018 04:23 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@bluet
bluet / monospace.sol
Created August 31, 2018 05:02
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=true&gist=
pragma solidity ^0.4.16;
library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.

Running Minikube via LXD

I make some assumptions, and make no claims in how well supported this is or ever will be. I wanted to avoid using VMs because i've been working in containers for the last half decade. It made sense to just skip the middle man and use a machine type container system to run my minikube workloads.

Why not juju?

Simply put, Juju does a fantastic job; but to stay objective I wanted to achieve minikube in LXD as a functional alternative to juju deploy kubernetes-core, or using KVM/VirtualBox in this solution.