Skip to content

Instantly share code, notes, and snippets.

@itsff
itsff / docker-compose.yml
Last active January 6, 2016 19:30
Sample docker-compose.yml
# Reverse proxy for routing web traffic
web_proxy:
image: dmp1ce/nginx-proxy-letsencrypt
restart: always
ports:
- 80:80
- 443:443
volumes:
- /var/run/docker.sock:/tmp/docker.sock
- ~/sites/certs:/etc/nginx/certs
@itsff
itsff / logic.tconf
Created March 3, 2015 17:59
Optimization test
pub.Symbol = src.Symbol
pub.Trade = src.Trade
pub.Ask = src.Ask
if src.MsgType == "D"
if src.BatCode == "B"
pub.Junk = veh.Bid
pub.Bid = 123
end
end
@itsff
itsff / Default.tconf
Created February 25, 2015 20:05
Sample tconf script
# Let's do some copies
pub.Symbol = src.Symbol
pub.Trade = src.Trade
pub.Ask = src.Ask
# Blank out pub.Bid
blank({}, {pub.Bid})
# Some simple condition
if src.Bid > 10
@itsff
itsff / HowToUseJIT.cpp
Created January 21, 2015 17:44
Copy of LLVM example code on how to use LLVM JIT
//
// Original URL: https://llvm.org/svn/llvm-project/llvm/trunk/examples/HowToUseJIT/HowToUseJIT.cpp
//
//===-- examples/HowToUseJIT/HowToUseJIT.cpp - An example use of the JIT --===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
@itsff
itsff / CME_PIT_Feed
Last active August 29, 2015 14:13
Graph defined in terms of its outputs
<?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns">
<key attr.name="label" attr.type="string" for="node" id="label"/>
<key attr.name="Edge Label" attr.type="string" for="edge" id="edgelabel"/>
<key attr.name="weight" attr.type="double" for="edge" id="weight"/>
<key attr.name="Edge Id" attr.type="string" for="edge" id="edgeid"/>
<key attr.name="r" attr.type="int" for="node" id="r"/>
<key attr.name="g" attr.type="int" for="node" id="g"/>
<key attr.name="b" attr.type="int" for="node" id="b"/>
<key attr.name="x" attr.type="float" for="node" id="x"/>
@itsff
itsff / example.hpp
Created August 26, 2014 21:14
Eugene
extern "C"
{
#define restrict __restrict
#include <ttsdk/whatever.h>
#include <ttsdk/order.h>
// ...
#include <fcntl.h>
@itsff
itsff / edge.py
Last active August 29, 2015 14:05
Python EdgeServer client
import websocket
import json
import requests
import base64
def get_access_token(username, password, auth_url="https://id.ttstage.com/oauth/token"):
login_payload = {'grant_type': 'password', 'username': username, 'password': password}
auth = base64.b64encode("b7b9974e8e2244e387ab64cadd0d667a:830b5b391b474a4780a8697d0396a27762aa40367e8549578ae71149df8c78c5")
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Interview Questions</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
@itsff
itsff / build.mk
Last active August 29, 2015 14:01
shitty algo
name = my_shitty_so_algo
lang = c
type = shared
c_compiler_flags = -Wno-unused-parameter
include_paths = ../algo/ttsdk/include
source = main.c
// ... all necessary imports ...
package net.filipfracz.samples;
class MainActivityHelper
{
public EditText name;
public Button save_button;
public MainActivityHelper(Context context)