Skip to content

Instantly share code, notes, and snippets.

@tachang
tachang / gist:ad8c2d0548e59ce353773ca75a5006c1
Created July 26, 2016 19:41
Hacky way to get it to require js format
/**
* CSS conic-gradient() polyfill
* By Lea Verou — http://lea.verou.me
* MIT license
*/
var cg;
(function(){
@tachang
tachang / gist:cc1ab7100762f10d0e30
Created November 15, 2015 21:26
Chicktech Robotics Workshop Notes
May need to give world read/write permissions to Arduino device:
chmod o+rw /dev/ttyUSB0
### Keybase proof
I hereby claim:
* I am tachang on github.
* I am tachang (https://keybase.io/tachang) on keybase.
* I have a public key whose fingerprint is 1C43 0026 4CF6 D6D5 BEFF F03B DC2A 8174 F1BB CD35
To claim this, I am signing this object:
@tachang
tachang / recreate_snapshot.sh
Created April 10, 2015 19:51
Recreate LVM snapshot
#!/bin/bash
# Stop crashplan temporarily
/etc/init.d/crashplan stop
# Unmount the datasnapshot
umount /mnt/datasnapshot
# Destroy snapshot and recreate it
lvremove -f /dev/example-vg/datasnapshot
@tachang
tachang / network-restart.sh
Created April 10, 2015 19:37
Cleanly restart the default libvirt network
#!/bin/bash
#
# Yury V. Zaytsev <yury@shurup.com> (C) 2011
#
# This work is herewith placed in public domain.
#
# Use this script to cleanly restart the default libvirt network after its
# definition have been changed (e.g. added new static MAC+IP mappings) in order
# for the changes to take effect. Restarting the network alone, however, causes
# the guests to lose connectivity with the host until their network interfaces
Option 1)
<div>
<h3>Header</h3>
</div>
- Use position relative on h3. Problem is that it looks on the outside but the markup is on the inside.
@tachang
tachang / SassMeister-input.scss
Created August 19, 2014 16:26
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.0.rc.1)
// ----
fdsaf
/**
* Generates a frame of data using GL commands.
*/
private void generateSurfaceFrame(int frameIndex) {
frameIndex %= 8;
int startX, startY;
if (frameIndex < 4) {
// (0,0) is bottom-left in GL
startX = frameIndex * (mWidth / 4);
startY = mHeight / 2;
@tachang
tachang / CameraToMpegTest.java
Created June 17, 2014 17:43
CameraToMpegTest.java
/*
* Copyright 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
### Keybase proof
I hereby claim:
* I am tachang on github.
* I am tachang (https://keybase.io/tachang) on keybase.
* I have a public key whose fingerprint is A6A3 C419 9CBD 8EDF 649C 934B 451E 9BC4 9FA8 2390
To claim this, I am signing this object: