Skip to content

Instantly share code, notes, and snippets.

@inh3
inh3 / gist:21264df2b53dd0415fbe
Created April 29, 2015 21:25
Angular.js Animation
.animated-class.ng-hide-add.ng-hide-add-active,
.animated-class.ng-hide-remove.ng-hide-remove-active {
transition: height 1s linear;
-webkit-transition: height 1s linear;
-moz-transition: height 1s linear;
-o-transition: height 1s linear;
overflow: hidden;
}
.animated-class.ng-hide {
@inh3
inh3 / gist:c74f5d465cc5d321ca18
Created April 29, 2015 03:05
Node.js 0.8 build & test
/home/<user>/.nvm/v0.8.28/lib/node_modules/npm/bin/node-gyp-bin/node-gyp rebuild
./node_modules/mocha/bin/mocha ./test --reporter spec
@inh3
inh3 / gist:64cfa3ca576b06d15789
Created October 1, 2014 14:59
MTU Optimization on Windows
# check MTU size with ping
ping 196.30.66.46 -t -f -l 1472
# view adapters
netsh interface ipv4 show subinterfaces
# set MTU size
netsh interface ipv4 set subinterface "Ethernet" mtu=1492 store=persistent
@inh3
inh3 / gist:8e61a27d7c40a39d7ecc
Last active August 29, 2015 14:05
OS X Mouse Acceleration
# default: 0.6875
# default (new): 1.5
# read the current mouse accel
defaults read -g com.apple.mouse.scaling
# no mouse acceleration
defaults write -g com.apple.mouse.scaling -1
@inh3
inh3 / gist:29ee18f639bd7a7b3ec8
Created June 6, 2014 02:46
Retain changes to environment variables set by a batch file when called from a powershell script
##############################################################################
##
## Invoke-CmdScript
##
## From Windows PowerShell Cookbook (O'Reilly)
## by Lee Holmes (http://www.leeholmes.com/guide)
##
##############################################################################
<#
@inh3
inh3 / gist:70f42224a76ca4ab1287
Created June 6, 2014 02:32
Execute nvmw from PowerShell
Set-StrictMode -Version 3
# create temp file to store batch local env
$tempFile = [IO.Path]::GetTempFileName()
Invoke-Command -ScriptBlock { cmd /c "nvmw.bat $args && set > `"$tempFile`"" } -ArgumentList $args -NoNewScope
# find path variable and set path
Get-Content $tempFile | Foreach-Object {
if($_ -match "^(PATH)=(.*)$")
@inh3
inh3 / gist:bd0aac0456887f7d4d53
Created June 6, 2014 00:00
Powershell script to print out each value in the system path
$env:Path.split(";")
@inh3
inh3 / gist:9176721
Last active August 29, 2015 13:56
gyp visual studio compile as
# http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.vcprojectengine.compileasoptions.aspx
# 0 - compileAsDefault
# 1 - compileAsC
# 2 - compileAsCPlusPlus
['OS=="win"', {
'msvs_settings': {
'VCCLCompilerTool': {
'CompileAs': '2'
}
@inh3
inh3 / gist:9161442
Last active April 21, 2020 18:29
valgrind with node.js
valgrind --leak-check=full node --expose_gc script.js
@inh3
inh3 / git-commands
Last active December 30, 2015 03:49
Git commands.
## add color to terminal output
git config --global color.ui true