Skip to content

Instantly share code, notes, and snippets.

@luckyshot
luckyshot / response.php
Last active December 30, 2019 16:02
Web scraping done right (with cUrl and user agent)
<?php return array (
'url' => 'https://xaviesteve.com/',
'content' => '<!doctype html><html>...</html>',
'cookies' => '__cfduid=d3fa669e1069e72c2e47d127ab9b8e11f1465390629',
'http_code' => 200,
'content_type' => 'text/html; charset=UTF-8',
'header_size' => 578,
'request_size' => 229,
'filetime' => -1,
'ssl_verify_result' => 0,
@henriquemoody
henriquemoody / sublime-text-2.sh
Last active July 8, 2021 09:54
Install Sublime Text on Fedora.
#!/usr/bin/env bash
# Usage: {script} [ OPTIONS ] TARGET VERSION
#
# TARGET Default target is "/usr/local".
# VERSION If not defined tries to get the build into the Sublime Text 2 website.
#
# OPTIONS
#
# -h, --help Displays this help message.
#
@Jud
Jud / Price-Time Matching Engine.c
Created June 1, 2012 23:56
Price-Time Matching Engine
/*****************************************************************************
* QuantCup 1: Price-Time Matching Engine
*
* Submitted by: voyager
*
* Design Overview:
* In this implementation, the limit order book is represented using
* a flat linear array (pricePoints), indexed by the numeric price value.
* Each entry in this array corresponds to a specific price point and holds
* an instance of struct pricePoint. This data structure maintains a list