Skip to content

Instantly share code, notes, and snippets.

ptterns:
- name: add_trade_terminal
level: error
body: |
`let $theme = $widget.getTheme();` => `let $theme=$widget.getTheme();var margin=.1,tmode="cvr",dd=$widget.createDropdown({title:"Margin",tooltip:"How Much Margin To Use Per Trade",items:[{title:"5",onSelect:()=>{margin=.05,console.log("5"),dd.innerHTML="5"}},{title:"10",onSelect:()=>{margin=.1,console.log("10")}},{title:"15",onSelect:()=>{margin=.15,console.log("15")}},{title:"20",onSelect:()=>{margin=.2,console.log("20")}},{title:"30",onSelect:()=>{margin=.3,console.log("30")}},{title:"50",onSelect:()=>{margin=.5,console.log("50")}},{title:"70",onSelect:()=>{margin=.7,console.log("70")}},{title:"ZH",onSelect:()=>{tmode="zerohero",console.log(tmode)}},{title:"CO",onSelect:()=>{tmode="cvr",console.log(tmode)}}],icon:'<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><g fill="none" stroke="currentColor"><circle cx="10" cy="10" r="2.5"/><circle cx="18" cy="18" r="2.5"/><path stroke-linecap="square" d="M17.5 7.5l-7 13"/></g></sv
@morgante
morgante / README.md
Last active March 10, 2018 06:25
Git command for adding Google Cloud Source Repos as a remote

Even though the process of adding cloud source repos as remotes is quite easy, I frequently forget it.

Just place git-google in your $PATH as an executable to get a handy git google command which adds a remote for you. Use it like so to add a repo from the current gcloud project:

git google $REPO_NAME
class AccountPage extends Component {
submitHandler(data) {
var self = this;
this.props.item.title = "New Title";
this.props.item.save();
}
render() {
...
}
@morgante
morgante / gpg-agent.conf
Created February 8, 2016 12:26 — forked from nl5887/gpg-agent.conf
Using GPG Agent on OS-X
launchctl unload -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist
launchctl load -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist
FROM quay.io/somespider/doorman-base
# Load app dependencies
ADD . /app/src
RUN mkdir -p /app/src/logs
WORKDIR /app/src
# Install bower dependencies
RUN bower install --allow-root
==================================================================
https://keybase.io/morgante
--------------------------------------------------------------------
I hereby claim:
* I am an admin of http://morgante.net
* I am morgante (https://keybase.io/morgante) on keybase.
* I have a public key with fingerprint A2CC 3710 C9F1 6F05 47BB A4BA 9907 691B 20A2 4593

Keybase proof

I hereby claim:

  • I am morgante on github.
  • I am morgante (https://keybase.io/morgante) on keybase.
  • I have a public key whose fingerprint is 5A6A 61DC 43EC 8B89 1338 0908 E0DE CEE1 5411 CDB1

To claim this, I am signing this object:

var dfpLoaded = false;
var docReady = false;
script.onload = function() {
amplify.publish('dfp-loaded');
};
amplify.subscribe('dfp-loaded', function() {
dfpLoaded = true;
run();
buf <- mongo.bson.buffer.create()
mongo.bson.buffer.start.object(buf, "create_time")
ts <- mongo.timestamp.create(strptime("02-05-2013", "%m-%d-%Y"), increment=1)
mongo.bson.buffer.append.time(buf, "$gte", ts)
mongo.bson.buffer.finish.object(buf)
query <- mongo.bson.from.buffer(buf)
buf <- mongo.bson.buffer.create()
mongo.bson.buffer.append(buf, "name", 1L)
mongo.bson.buffer.append(buf, "create_time", 1L)
[
{
"v" : 1,
"key" : {
"_id" : 1
},
"ns" : "businessinsider.blog.post",
"name" : "_id_"
}
]