Skip to content

Instantly share code, notes, and snippets.

View enginespot's full-sized avatar
🏠
Working from home

Hongde Liu enginespot

🏠
Working from home
View GitHub Profile
@enginespot
enginespot / calcHash.js
Created September 30, 2015 10:19
calcHash
var timestamp = parseInt(new Date().getTime() / 1000);
var signKey = "OA-Sign";
sessionStorage.setItem(signKey,
'passport.user.register'
+ '1.0'
+ '{"username":"sessionStorage","email":"sessionStorage@qq.com","password":"sessionStorage","passwordConfirmation":"sessionStorage"}'
+ timestamp
);
calcHash = function() {
@enginespot
enginespot / debug process
Created September 11, 2015 09:57
debug process
http://blogs.msdn.com/b/visualstudioalm/archive/2014/11/24/introducing-the-child-process-debugging-power-tool.aspx
@enginespot
enginespot / temp file
Created August 11, 2015 18:26
temp file
* rustc version: rustc 1.4.0-nightly (5aca49c69 2015-08-10)
checking for arm-none-eabi-gcc... arm-none-eabi-gcc
checking for arm-none-eabi-strip... arm-none-eabi-strip
checking for arm-none-eabi-objcopy... arm-none-eabi-objcopy
checking for arm-none-eabi-objdump... arm-none-eabi-objdump
checking for arm-none-eabi-ar... arm-none-eabi-ar
configure: creating ./config.status
config.status: creating Makefile
config.status: creating .cargo/config
Updating git repository `https://github.com/hackndev/rlibc`
@enginespot
enginespot / compile error
Last active August 29, 2015 14:27
compile error
'''
./support/build-jenkins.sh
* rustc version: rustc 1.4.0-nightly (5aca49c69 2015-08-10)
checking for arm-none-eabi-gcc... arm-none-eabi-gcc
checking for arm-none-eabi-strip... arm-none-eabi-strip
checking for arm-none-eabi-objcopy... arm-none-eabi-objcopy
checking for arm-none-eabi-objdump... arm-none-eabi-objdump
checking for arm-none-eabi-ar... arm-none-eabi-ar
configure: creating ./config.status
config.status: creating Makefile
@enginespot
enginespot / compile zinc and run mbed demo
Last active August 29, 2015 14:25
compile zinc and run mbed demo
export RUST_BACKTRACE=1
export PLATFORM="lpc17xx"
./support/build-jenkins.sh
cd /Users/edwin/Projects/zinc/examples/blink_lpc17xx
cargo build --target=thumbv7m-none-eabi --release
#build sample
Fresh macro_zinc v0.1.0 (file:///home/edwin/Projects/zinc/examples/blink_lpc17xx)
Fresh core v1.0.0 (https://github.com/hackndev/rust-libcore#d9dc4f94)
Fresh syntaxext_lint v0.1.0
Fresh rlibc v0.1.3 (https://github.com/hackndev/rlibc?branch=zinc#0acbe22b)
Fresh volatile_cell v1.0.0 (file:///home/edwin/Projects/zinc/examples/blink_lpc17xx)
Fresh ioreg v0.1.0 (file:///home/edwin/Projects/zinc/examples/blink_lpc17xx)
Fresh zinc v0.1.0 (file:///home/edwin/Projects/zinc/examples/blink_lpc17xx)
Compiling blink v0.0.1 (file:///home/edwin/Projects/zinc/examples/blink_lpc17xx)
Running `rustc src/main.rs --crate-name blink --crate-type bin -g --cfg feature=\"default\" --cfg feature=\"mcu_lpc17xx\" --out-dir /home/edwin/Projects/zinc/examples/blink_lpc17xx/target/thumbv7m-none-eabi/debug --emit=dep-info,link --target thumbv7m-none-eabi -C ar=arm-none-eabi-ar -C linker=arm-none-eabi-gcc -L dependency=/home/edwin/Projects/zinc/examples/blink_lpc17xx/target/thumbv7m-none-ea
@enginespot
enginespot / svn webserver on macos
Created July 20, 2015 13:02
svn webserver on macos
LoadModule dav_module libexec/apache2/mod_dav.so
LoadModule dav_fs_module libexec/apache2/mod_dav_fs.so
LoadModule dav_svn_module /opt/subversion/lib/svn-apache/mod_dav_svn.so
LoadModule authz_svn_module /opt/subversion/lib/svn-apache/mod_authz_svn.so
brew tap cheba/rust-nightly
brew install rust-nightly
@enginespot
enginespot / arm development for mac
Last active August 29, 2015 14:25
arm development for mac
brew tap PX4/homebrew-px4
brew update
brew install gcc-arm-none-eabi-48
@enginespot
enginespot / req.cpp
Last active August 29, 2015 14:21 — forked from anonymous/req.cpp
//Include a script file into current context
//Raise javascript exception if load failed
v8::Handle<v8::Value> _BeaScript::include( const Arguments& args )
{
boost::filesystem::path parentPath = scriptPath.parent_path();
//v8::String::Utf8Value fileName(args[i]);
std::string fileName = bea::Convert<std::string>::FromJS(args[0], 0);
//Add the script path to it