Skip to content

Instantly share code, notes, and snippets.

View timdream's full-sized avatar
🏃‍♂️
I may be slow to respond.

Timothy Guan-tin Chien timdream

🏃‍♂️
I may be slow to respond.
View GitHub Profile

注意:指令在後續版本略有修改,建議閱讀專案 README。

SNAFU 使用教學(暫定)

這篇文章會簡單描述如何使用 SNAFU Python installer manager

這個專案源自我對社群不懂 Windows 又愛亂教的不滿。如果有興趣讀相關故事,以及一些背後邏輯,可以參考我在碼天狗上的抱怨文

特點

@autonome
autonome / aframe-orientation-firefox-android.md
Created June 30, 2017 16:45
A-Frame orientation bug on Firefox Android

A-Frame orientation bug on Firefox Android

A-Frame no longer responds to device motion on Firefox on Android after Firefox version 53.

Cause

Kip removed Cardboard support in bug 1250244, which caused the problem. However, A-Frame orientation still works on other non-WebVR non-Cardboard mobile browsers.

Why doesn't the WebVR polyfill kick in and wire up orientation API support?

@kripken
kripken / hello_world.c
Last active September 29, 2024 17:39
Standalone WebAssembly Example
int doubler(int x) {
return 2 * x;
}
@mystor
mystor / icecc-jobs.pl
Last active March 20, 2021 23:47
A simple script for counting the avaliable jobs in an icecream network
#!/usr/bin/env perl
# This short script queries the icecream scheduler to discover what machines are connected,
# and sums the maximum job counts for all x86-64 machines.
# It can be used in your mozconfig as follows:
# mk_add_options MOZ_MAKE_FLAGS="-j$(icecc-jobs)"
# if this script is on your PATH, and named icecc-jobs
use List::Util qw(sum0);
function vacation() {
/*
* trigger when someone submits the form
* 1. add an event to calendar
* 2. send a message to slack channel
*/
// the sheet for form data is called "data"
var sheetName = 'data';
var calendarID = '';
@hfreire
hfreire / qemu_osx_rpi_raspbian_jessie.sh
Last active February 4, 2025 00:47
How to emulate a Raspberry Pi (Raspbian Jessie) on Mac OSX (El Capitan)
# Install QEMU OSX port with ARM support
sudo port install qemu +target_arm
export QEMU=$(which qemu-system-arm)
# Dowload kernel and export location
curl -OL \
https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.1.7-jessie
export RPI_KERNEL=./kernel-qemu-4.1.7-jessie
# Download filesystem and export location
@paulirish
paulirish / what-forces-layout.md
Last active March 1, 2025 05:48
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@Belphemur
Belphemur / bridge-conf
Last active January 29, 2024 11:45
Configuration and scripts for OpenVPN in Bridged Mode. Script to generate new client (with their keys and configuration file for OpenVPN). Script to manage the bridge. Configuration for systemd to start/stop the OpenVPN with Brige.
#!/bin/bash
# Define physical ethernet interface to be bridged
# with TAP interface(s) above.
eth="eth0"
eth_ip="192.168.42.2"
eth_netmask="255.255.255.0"
eth_broadcast="192.168.42.255"
eth_gateway="192.168.42.1"
eth_mac="XX:XX:XX:XX:XX:XX"
@rickychien
rickychien / push-to-try.sh
Last active August 29, 2015 14:11
Push to mozilla try server (Usage: ./push-to-try.sh branch-name)
#!/bin/bash
# setup your mozilla-central REPO and github REMOTE.
# path to mozilla-central
REPO="mozilla-central"
# regualr expression for gaia github repo url
REMOTE="https:\/\/github\.com\/RickyChien\/gaia"