Skip to content

Instantly share code, notes, and snippets.

View shuangjj's full-sized avatar

Lex shuangjj

View GitHub Profile
0x1fe684910db870666677f73d2bc02dfd06475912
0x345552d09af5c7f3f0bc44a37c95e5c3905a24a5
0x3b7f58b6ae8643dac0ac16560b7b38991cdec338
0x8d07f72520e72e2e753be34723d50813d938b79b
vim ~/.ctags
--langdef=Solidity
--langmap=Solidity:.sol
--regex-Solidity=/^contract[ \t]+([a-zA-Z0-9_]+)/\1/c,contract/
--regex-Solidity=/[ \t]*function[ \t]+([a-zA-Z0-9_]+)/\1/f,function/
--regex-Solidity=/[ \t]*event[ \t]+([a-zA-Z0-9_]+)/\1/e,event/
--regex-Solidity=/[ \t]*(struct[ \t]+[a-zA-Z0-9_]+)([ \t]*\{)/\1/v,variable/
--regex-Solidity=/[ \t]*(enum[ \t]+[a-zA-Z0-9_]+)([ \t]*\{)/\1/v,variable/
--regex-Solidity=/[ \t]*mapping[ \t]+\(([a-zA-Z0-9_]+)[ \t]*=>[ \t]*([a-zA-Z0-9_]+)\)[ \t]+([a-zA-Z0-9_]+)/\3 (\1=>\2)/m,mapping/
- List all i2c buses on BBB
`i2cdetect -l`
i2c-0 unknown OMAP I2C adapter N/A
i2c-2 unknown OMAP I2C adapter N/A
- Detect online i2c slaves
`sudo i2cdetect -y -r 2`
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- 29 -- -- -- -- -- --
Never try to install docker-hypriot on beaglebone
---------------------------------------------------------
ubuntu@ubuntu-armhf:~/Downloads$ sudo dpkg -P docker-hypriot
(Reading database ... 16512 files and directories currently installed.)
Removing docker-hypriot (1.10.3-1) ...
* Docker is managed via upstart, try using service docker stop
invoke-rc.d: initscript docker, action "stop" failed.
dpkg: error processing package docker-hypriot (--purge):
subprocess installed pre-removal script returned error exit status 1
## Setup SSH terminal title
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
# Show the currently running command in the terminal title:
# http://www.davidpashley.com/articles/xterm-titles-with-bash.html
show_command_in_title_bar()
{
@shuangjj
shuangjj / vimrc
Last active October 3, 2016 18:33
vimrc
" Vim Configuration file with vundle plugin manager
" Use vim settings rather than vi settings
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
eris keys gen --> failed
-----------------------
docker run -it --entrypoint "/bin/bash" quay.io/eris/keys:alpine
bash-4.3$ eris-keys gen --no-pass
Could not connect to eris-keys server. Start it with `eris-keys server &`. Error: Post http://localhost:4767/gen:
dial tcp: lookup localhost on 8.8.8.8:53: no such host
bash-4.3$ go version
go version go1.5.4 linux/amd64