Skip to content

Instantly share code, notes, and snippets.

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 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
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
@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
@hardywu
hardywu / bash_profile
Created September 23, 2014 17:55
bash codes to color terminal fonts
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -GFh'
@hardywu
hardywu / t.rb
Created October 31, 2014 20:38
dcf
https://slack-files.com/files-pub/T02HN3AC9-F02SRGE8E-0aa045/lunchbox-v3.png
2015-05-11 02:21:51 -0400
./configure
--disable-debug
--prefix=/Users/hardy/local/Cellar/postgresql/9.4.1_1
--datadir=/Users/hardy/local/Cellar/postgresql/9.4.1_1/share/postgresql
--docdir=/Users/hardy/local/Cellar/postgresql/9.4.1_1/share/doc/postgresql
--enable-thread-safety
--with-bonjour
--with-gssapi
[Unit]
Description=Shadowsocksr-Server: a proxy server
After=network.target
[Service]
Type=forking
PIDFile=/run/shadowsocksrd.pid
WorkingDirectory=/root/shadowsocks
ExecStart=/root/shadowsocks/server.py
Restart=always
@hardywu
hardywu / Dockerfile
Created November 10, 2018 16:41
Development Environment in Docker
FROM ubuntu:18.04
MAINTAINER Hardy Wu 'hardy0wu@gmail.com'
# Update APT mirrors
RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
RUN apt-get update && apt-get install -y curl bash git gnupg zlib1g-dev sudo vim build-essential ruby ruby-dev ruby-bundler
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
@hardywu
hardywu / chenpay.rb
Last active April 9, 2019 16:38
chenpay ruby version
require 'date'
require 'faraday'
require 'faraday_middleware'
class Job
# queue_as :default
attr_accessor :cookie
@cookie = false
def con