Skip to content

Instantly share code, notes, and snippets.

View mtavkhelidze's full-sized avatar
🇬🇪
OOP is an exceptionally bad idea which could only have originated in California.

Misha Tavkhelidze mtavkhelidze

🇬🇪
OOP is an exceptionally bad idea which could only have originated in California.
View GitHub Profile
# Generic Makefile with deps for C++
CXX = g++
CXXFLAGS = -std=c++14 -Wall -Wextra -Werror -pedantic-errors \
-Wno-unused-const-variable -Wno-missing-braces \
-Wfatal-errors -MMD -O0 -g
SRC = $(wildcard *.cpp)
BIN = $(patsubst %.cpp,%.bin,$(SRC))
OBJ = $(SRC:.cpp=.o)
/**
* mocha_runner.js — Simple Mocha Runner for ES6
*
* Test your ES6 code with Mocha
*
* In package.json: "test": "babel-node run_mocha.js"
*
* Written by Misha Tavkhelidze <misha.tavkhelidze@gmail.com>
*
* Copyright (c) 2016 Misha Tavkhelidze
@mtavkhelidze
mtavkhelidze / pmga.js
Last active September 4, 2016 12:29
Poor man's Google Analytics with webtask.io
/*eslint no-console: 0*/
/**
Poor man's Google Analytics webtask.io Task.
Written by Misha Tavkhelidze
*/
'use strict';
var mongo = require('mongodb').MongoClient;
@mtavkhelidze
mtavkhelidze / example.m
Last active August 27, 2016 09:48 — forked from jakepetroules/example.m
Drawing animated focus rings in Cocoa
#import <dlfcn.h>
static off_t lookupPrivateSymbol(const char *path, const char *symbol)
{
// TODO: Parse the Mach-O file
NSTask *task = [[NSTask alloc] init];
task.launchPath = @"/usr/bin/nm";
task.arguments = @[@"-a", @(path)];
NSPipe *outputPipe = [NSPipe pipe];
task.standardOutput = outputPipe;