sudo cp homebridge /etc/default
sudo cp homebridge.service /etc/systemd/system
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
RowSpacing=2 | |
FontHeight=10 | |
Locale=C | |
Charset=UTF-8 | |
Transparency=low | |
Font=JetBrains Mono | |
BoldAsFont=yes | |
FontSmoothing=default | |
ForegroundColour=160,160,160 | |
BackgroundColour=27,29,30 |
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
// ==UserScript== | |
// @name HideMixpanelMenu | |
// @namespace HMPM | |
// @version 0.1 | |
// @description Hide menu feature in Mixpanel for dashboard displaying | |
// @author Joshua Zhang | |
// @include https://mixpanel.com/report/* | |
// @grant none | |
// ==/UserScript== |
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
let blacklists = ["*://mail.google.com/*","*://inbox.google.com/*","*://www.figma.com/*","*://configure.ergodox-ez.com/*"] |
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
var co = require('co'); | |
co(function* () { | |
var result = 0; | |
result = yield Promise.resolve(1); | |
console.log(result); // 1 | |
result = yield Promise.resolve(result + 1); | |
console.log(result); // 2 | |
return 3; | |
}).then(function(res) { |
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
@mixin e($element) { | |
@at-root { | |
#{&}__#{$element} { | |
@content; | |
} | |
} | |
} | |
@mixin m($modifier) { | |
@at-root { |
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
let rules = []; | |
function appendRule(path, callback) { | |
rules.push([path, callback]); | |
} | |
function matchPath(path, currentPath) { | |
let params = {}; | |
// If there's a '/' in the end of path, trim it. |
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
// https://github.com/mrdoob/three.js/commit/8406cd7c6ecbdaca8e9d985158e5403492da48b5 | |
import THREE from 'three'; | |
export default function sortPoints(points, camera) { | |
var vector = new THREE.Vector3(); | |
// Model View Projection matrix | |
var matrix = new THREE.Matrix4(); | |
matrix.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse ); |
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
function randomRGB() { | |
const c = 0xffffff * Math.random(); | |
return [c >> 16, c >> 8 & 255, c & 255]; | |
} |
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
function BrownNoise(audioContext) { | |
this.node = audioContext.createBufferSource(); | |
var bufferSize = 2 * audioContext.sampleRate, | |
buffer = audioContext.createBuffer(1, bufferSize, audioContext.sampleRate), | |
data = buffer.getChannelData(0); | |
lastOutput = 0; | |
for (var i = 0, len = data.length; i < len; i++) { | |
var white = Math.random() * 2 - 1; |
NewerOlder