Skip to content

Instantly share code, notes, and snippets.

#include "opencv2/highgui/highgui.hpp"
#include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/legacy/legacy.hpp"
#include <iostream>
using namespace cv;
using namespace std;

How to use a PS3 controller on Mac OS X 10.7 (Lion)

  1. Open Apple menu -> System Preferences -> Bluetooth and disable Bluetooth on Mac as well as any other nearby Macs or devices which will try to pair with and confuse the controller.

  2. Reset PS3 controller by inserting paperclip into pinhole near L2 button.

  3. Connect PS3 controller to Mac with USB cable.

  4. Enable Bluetooth.

[alias]
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
@theJenix
theJenix / nginx.conf
Created January 2, 2020 21:20 — forked from dctrwatson/nginx.conf
Caching NPM proxy using Nginx
user www-data;
worker_processes 4;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

{
"rust-analyzer.checkOnSave.command": "clippy"
}
@theJenix
theJenix / haxe-unzip-example.hx
Created October 30, 2020 15:22 — forked from ruby0x1/haxe-unzip-example.hx
Unzip a file with haxe - example
public static function unzip( _path:String, _dest:String, ignoreRootFolder:String = "" ) {
var _in_file = sys.io.File.read( _path );
var _entries = haxe.zip.Reader.readZip( _in_file );
_in_file.close();
for(_entry in _entries) {
var fileName = _entry.fileName;
import haxe.macro.Expr;
import haxe.macro.Context;
class Build {
static public function types() {
var pos = Context.currentPos();
function mkPath(name:String):TypePath {
var parts = name.split('.');
return {
sub: null,

How do I get string content from Haxe to an untyped cpp block?

static public function haxeFunction(inputString:String)
{
  untyped __cpp__ ('
  
      myStruct myFoo;       
      myFoo.data = ???;   //Should be the string contents of Haxe String inputString (1st 16 characters, ASCII only is fine)
 
#!/usr/bin/env python3
"""Print emails from a given date interval.
Usage:
$ %(prog)s <since_date> <before_date>
since_date < before_date
Date format: DD-Mon-YYYY e.g., 3-Mar-2014