Skip to content

Instantly share code, notes, and snippets.

View if1live's full-sized avatar
💭
I may be slow to respond.

byunghoo.yu if1live

💭
I may be slow to respond.
View GitHub Profile
/**
* @author mrdoob / http://mrdoob.com/
*/
function html2canvas( element ) {
var range = document.createRange();
function getRect( rect ) {
@mandarinx
mandarinx / optimizations.md
Last active September 28, 2023 03:51
Unity3D optimization tips

Unity3D optimization tips

Some code allocates memory when running in the editor and not on the device. This is due to Unity doing some extra error handling so possible error messages can be output in the console. Much of this code is stripped during build. It's therefore important to profile on device, and do it regularly.

Optimizations often makes code more rigid and harder to reason. Don't do it until you really need to.

When profiling, wrap methods or portions of a method in Profiler.BeginSample(string name) and Profiler.EndSample() to make them easier to find in the profiler.

public class SomeClass {
@tsubaki
tsubaki / SkinnedMeshUpdater.cs
Created October 11, 2015 04:51
update SkinnedMesh
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.Assertions;
using System;
public class SkinnedMeshUpdater : MonoBehaviour
{
[SerializeField]
SkinnedMeshRenderer original;
@mitsutaka
mitsutaka / aerofs.linux
Created July 7, 2013 07:33
Aerofs init script for linux
#! /bin/sh
USER=mitz
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Aerofs CLI Client"
NAME=aerofs
START_DAEMON="/usr/bin/aerofs-cli"
STOP_DAEMON="/usr/bin/aerofs-sh shutdown"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
@emil10001
emil10001 / accidental_clicks_description.md
Last active March 10, 2025 18:14
accidental clicks Chromebook crouton Pixelbook

The accidental clicks while in crouton (chrooted Ubuntu) on my Pixel are kind of annoying. The touchpad is super sensitive, resulting in a lot of extra clicks on stuff when I'm typing. In XFCE, there's a pretty easy way to deal with this.Simply go to Settings -> Mouse -> Touchpad and un-check 'Tap touchpad to Click'. Optionally, also 'Disable touchpad while typing'. I had been using the 'disable touchpad while typing' option for a bit, but I still get accidental clicks. I'm hoping that disabling the ultra-sensitive taps will give a better result

@nebiros
nebiros / Gemfile
Created May 23, 2012 15:58
rails + unicorn + rbenv + init.d daemon
group :production do
gem "unicorn"
end
@yagihiro
yagihiro / sample.c
Last active August 29, 2022 23:18
workqueue sample on linux kernel
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/workqueue.h>
static void mykmod_work_handler(struct work_struct *w);
static struct workqueue_struct *wq = 0;
static DECLARE_DELAYED_WORK(mykmod_work, mykmod_work_handler);
static unsigned long onesec;