Skip to content

Instantly share code, notes, and snippets.

Ken Carpenter mindjuice

Block or report user

Report or block mindjuice

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:b371be31a1b9a28d6b75ca65ae7b1862
set initialInvestmentUsd to 142000
set scOwned to 1000000
set jsonBtcSc to do shell script "curl https://bittrex.com/api/v1.1/public/getticker?market=btc-sc"
set valueBtcSc to do shell script "sed s/[a-zA-Z:{}]//g <<< " & jsonBtcSc
set valueBtcSc to do shell script "sed s/.*,//g <<< " & valueBtcSc
set jsonUsdtBtc to do shell script "curl https://bittrex.com/api/v1.1/public/getticker?market=usdt-btc"
set valueUsdtBtc to do shell script "sed s/[a-zA-Z:{}]//g <<< " & jsonUsdtBtc
set valueUsdtBtc to do shell script "sed s/.*,//g <<< " & valueUsdtBtc
# set numberBtcSc to replace_chars(valueBtcSc, ".", ",") as number
@mindjuice
mindjuice / authActions.js
Last active May 19, 2016
Simple HTTP requests code using promises. Integrates nicely with Redux actions when using redux-thunk middleware. `httpRequests.js` has the `get`, `put`, `post` and `del` functions and `authActions.js` gives examples of calling `post()` and `get()`.
View authActions.js
import { get, post } from '../../../utils/httpRequests';
export const AUTH_LOGIN = 'AUTH_LOGIN';
export const AUTH_LOGOUT = 'AUTH_LOGOUT';
export const login = (email, password) => {
const params = { username: email, password };
return dispatch => post('/api/login', AUTH_LOGIN, params, dispatch);
};
You can’t perform that action at this time.