Skip to content

Instantly share code, notes, and snippets.

process.on "uncaughtException", (err) ->
console.error err
process.on "unhandledRejection", (err) ->
console.error err
@x-bart
x-bart / DockerfileLeanFoundation
Created October 3, 2018 10:22
QuantConnect DockerfileLeanFoundation
#
# LEAN Foundation Docker Container 20180716
# Cross platform deployment for multiple brokerages
# Intended to be used in conjunction with Dockerfile. This is just the foundation common OS+Dependencies required.
#
# Use base system for cleaning up wayward processes
FROM phusion/baseimage:0.9.22
MAINTAINER QuantConnect <contact@quantconnect.com>
@font-face {
font-family: 'gilroylight';
src: url('https://www.dropbox.com/s/w5t0d5ggb4e7q17/gilroy-light-webfont.woff2?dl=0') format('woff2'),
url('https://www.dropbox.com/s/sssysdx6bhi2hb8/gilroy-light-webfont.woff?dl=0') format('woff');
font-weight: 300;
font-style: normal;
}
function dataURItoBlob(dataURI) {
// convert base64/URLEncoded data component to raw binary data held in a string
var byteString;
if (dataURI.split(',')[0].indexOf('base64') >= 0)
byteString = atob(dataURI.split(',')[1]);
else
byteString = unescape(dataURI.split(',')[1]);
// separate out the mime component
var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];
@x-bart
x-bart / instalike.php
Created November 27, 2015 04:49
Like Instagram media (!need login&password)
<?php
class InstagramLike
{
const MAIN_URL = "https://instagram.com",
LOGIN_URL = "https://www.instagram.com/accounts/login/ajax/";
private $_csrf,
$_sessionid;
app = require('express')()
exec = require('child_process').exec
fs = require 'fs'
app.get "*", (req, resp) ->
file = "." + req.url
if fs.existsSync file
exec "coffee #{file}", (err, stdout, stderr) ->