Skip to content

Instantly share code, notes, and snippets.

@fuermosi777
fuermosi777 / Guide for API
Last active August 29, 2015 14:24
doc for Q API
Get backtesting data of DMA Strategy
/api/dma_backtesting/?code=000001&short=5&long=20&sd=0.05&length=700
Get buy/sell signal of latest trading day for DMA strategy
/api/dma_today/?code=000001&short=5&long=20&sd=0.05
Get all stock list
/api/stock_list/?category=hs300&keyword=xxx
Get single stock's realtime data
@fuermosi777
fuermosi777 / Guide for Q
Last active August 29, 2015 14:24
Guide for Q
<script src="q.js"></script>
<script src="q-data.js"></script>
<script src="q-basic.js"></script>
<script src="q-simulation.js"></script>
<script src="q-use.js"></script>
<script src="q-dma.js"></script>
<script src="q-realtime.js"></script>
@fuermosi777
fuermosi777 / README.md
Last active December 23, 2015 12:46
React ScrollView Component

To use:

import ScrollView from 'ScrollView.jsx`;
...
render() {
    return (
    <ScrollView>
        {aListThatScrolls}
     </ScrollView>
    );
@fuermosi777
fuermosi777 / AppView.js
Created October 22, 2015 22:04
A Flux-like structure for React Native
...
render() {
return (
<View>
// two components
<ListView/>
<MapView/>
</View>
)
}
@fuermosi777
fuermosi777 / .babelrc
Last active September 7, 2016 17:29
Very basic Ruby - React app
{
"presets": ["es2015", "react", "stage-0"],
"plugins": ["react-hot-loader/babel"]
}
@fuermosi777
fuermosi777 / goto-sublime
Created April 13, 2017 18:46 — forked from kendellfab/goto-sublime
Add mouse click `goto definition` in sublime text 3.
Linux - create "Default (Linux).sublime-mousemap" in ~/.config/sublime-text-3/Packages/User
Mac - create "Default (OSX).sublime-mousemap" in ~/Library/Application Support/Sublime Text 3/Packages/User
Win - create "Default (Windows).sublime-mousemap" in %appdata%\Sublime Text 3\Packages\User
[
{
"button": "button1",
"count": 1,
"modifiers": ["ctrl"],
"press_command": "drag_select",
@fuermosi777
fuermosi777 / gist:8ac1170f87fcc455458ac45978c97c88
Created June 8, 2018 05:20
shadowsocks whitelist oversea
var rules = [
"*.163.com/*",
"*.126.net/*",
"*.126.com/*",
"*.netease.com/*",
"*.163music.com/*",
"*.126.net/*",
"*.163yun.com/*",
"*.127.net/*",
"*.miaozhen.com/*",
# put in bashrc or zshrc
function code {
if [[ $# = 0 ]]
then
open -a "Visual Studio Code"
else
local argPath="$1"
[[ $1 = /* ]] && argPath="$1" || argPath="$PWD/${1#./}"
open -a "Visual Studio Code" "$argPath"
fi
@fuermosi777
fuermosi777 / me.json
Created July 19, 2018 22:29
iTerm2 profile
{
"Scrollback With Status Bar" : true,
"Tags" : [
],
"Ansi 12 Color" : {
"Blue Component" : 1,
"Green Component" : 0.3333333432674408,
"Red Component" : 0.3333333432674408
},
TZ=America/Los_Angeles date +'%H:%M:%S YT'