Skip to content

Instantly share code, notes, and snippets.

View diegoeche's full-sized avatar

Diego Echeverri diegoeche

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0px; padding: 0px }
#map_canvas { height: 100% }
</style>
<script type="text/javascript"
Models::Audience.first
=> #<FormsHub::Models::Audience @values={:id=>"ccdd57f2-d24f-4ff7-9356-b41f82756c94", :iid=>17, :account_id=>"0166cbcb-7827-4698-a267-fec98676db0b", :type=>"company", :name=>"Paid companies", :description=>nil, :facebook_account_id=>"act_10150428762524283", :facebook_audience_id=>"6103550209001", :company_segment_id=>"c6eddfbe-23ff-4287-b31c-9d3291c89da3", :person_segment_id=>nil, :company_exclusion_segment_id=>nil, :person_exclusion_segment_id=>nil, :role=>nil, :seniority=>nil, :search=>nil, :path=>nil, :status=>"active", :created_at=>2018-04-04 02:05:48 UTC, :updated_at=>2018-10-11 10:42:55 UTC, :last_sync_at=>nil, :archived_at=>nil}>
const axios = require('axios')
const sleep = require('sleep')
const base64 = require('base-64')
const appId = process.env["GEENY_APPLICATION_ID"]
const host = process.env["GEENY_APPLICATION_BROKER_URL"]
const brokerConfig = {
appId: appId,
messageTypeId: '54121087-14f1-4c2a-835f-117681618cc9', // incoming Develco messageType
const axios = require('axios')
const sleep = require('sleep')
const base64 = require('base-64')
const appId = process.env["GEENY_APPLICATION_ID"]
const host = process.env["GEENY_APPLICATION_BROKER_URL"]
const brokerConfig = {
appId: appId,
messageTypeId: '54121087-14f1-4c2a-835f-117681618cc9', // incoming Develco messageType
static bool STATS = false;
static const int FRAME_PLOT_SIZE = 50;
static float frameTimes[FRAME_PLOT_SIZE];
void renderUIElements(float elapsed) {
if (STATS) {
std::ostringstream os;
os << "T: " << elapsed;
std::string str = os.str();
char * cstr = new char [str.length()+1];
require "digest/md5"
require "openssl"
require "securerandom"
require 'benchmark'
require "base64"
SIZE = 1000
def create_test
ret = []
SIZE.times do
2.0.0p247 :012 > [nil,2,3].lazy.map { |x|
puts "evaluating #{x}. This could be expensive"
x ? x * 10 : x
}.detect { |x|
x && x >= 20
}
evaluating . This could be expensive
evaluating 2. This could be expensive
=> 20
lock = RedisLock.new(:client => $stats_wolverine,
:name => "My Lock",
:timeout => 10)
shared_var = 1
lock.atomically {
shared_var += 1
lock.atomically {
shared_var += 1 # This one fails

Global Tournament (How to optimize it)

Improve Competitiveness

What is competitiveness anyway?

Current Segmentation Problems

Payers

Lesson: KISS

Cheaters

1) "1092200529"
2) "100003618227694"
3) "100003158233371"
4) "100002542453833"
5) "1002157672"
6) "1341005026"
7) "100004161994675"
8) "1005935063"
9) "100001182421106"
10) "100001606315832"