Skip to content

Instantly share code, notes, and snippets.

@hardywu
hardywu / dropdown.js.coffee
Last active August 29, 2015 14:04
angular dropdown directive
'use strict';
app.directive 'dropdown', ['$document', ($document) ->
restrict: "CA"
scope: false
link: (scope, element, attrs) ->
scope.isOpen = false
closeDropdown = (event) ->
if event && event.isDefaultPrevented()
return
PREFIX="/usr/local"
RBENV_PREFIX="$PREFIX/rbenv"
BIN_PATH="$PREFIX/bin"
RBENV_GROUP="rbenv"
umask 002
## Install rbenv, ruby-build and rbenv-gem-rehash
git clone git://github.com/sstephenson/rbenv.git $RBENV_PREFIX

Apr 21 2013 00:21:18 am Elt: 00157 Seconds ID: No spectrum identifier defined Memory Size: 1024 Chls Conversion Gain: 1024 Adc Offset: 0000 Chls

Chn    Counts  ROI
  0,        0  000
  1,        0  000
  2,        0  000
  3,        0  000
  4,        0  000

Apr 21 2013 00:12:13 am Elt: 00066 Seconds ID: No spectrum identifier defined Memory Size: 1024 Chls Conversion Gain: 1024 Adc Offset: 0000 Chls

Chn    Counts  ROI
  0,        0  000
  1,        0  000
  2,        0  000
  3,        0  000
  4,        0  000

Apr 16 2013 01:32:21 am Elt: 01000 Seconds ID: No spectrum identifier defined Memory Size: 1024 Chls Conversion Gain: 1024 Adc Offset: 0000 Chls

Chn    Counts  ROI
  0,        0  000
  1,        0  000
  2,        0  000
  3,        0  000
  4,        0  000
@hardywu
hardywu / gist:10758513
Created April 15, 2014 18:49
Cal-Am241.asc
Apr 14 2013 01:42:20 am Elt: 00703 Seconds
ID: No spectrum identifier defined
Memory Size: 1024 Chls Conversion Gain: 1024 Adc Offset: 0000 Chls
Chn Counts ROI
0, 0 000
1, 0 000
2, 0 000
3, 0 000
4, 0 000
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below
# NEW WAY / EASY WAY
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb
sudo dpkg -i elasticsearch-1.0.1.deb
% These are examples of Feynman Diagrams using TikZ
% Author: Flip Tanedo, 2010. pt267@cornell.edu
\documentclass[12pt]{article} % Why do I use such a boring document clas?
% THE USUAL PACKAGES
\usepackage{amsmath,amssymb,amsfonts} % DON'T use cite, screws with bibtex + hyperref
\usepackage{color}
\usepackage{amsmath}
\usepackage{amsfonts}
inputs = %w[
CollectionSelectInput
DateTimeInput
FileInput
GroupedCollectionSelectInput
NumericInput
PasswordInput
RangeInput
StringInput
TextInput
@hardywu
hardywu / loudspeaker.md
Last active December 28, 2015 04:39
A temp translation for my friend

An introduction to the physics of the loudspeaker

  1. a few concepts about the sound Sound is a sequence of waves of pressure that propagates through compressible media such as air or water. People hear the sound when it reaches their ears. Without the media to propagate the waves, there would be no sound.

  2. Three physical quantities of the waves.

    1. Amplitude(A): The amplitude of the wave
  3. Frequency(F): The number of oscillations per unit time (the frequency range that human can hear is 20-200000Hz)