Skip to content

Instantly share code, notes, and snippets.

@adam-binks
adam-binks / latexdiff.md
Created May 7, 2022 17:18
How to LaTeX diff your Overleaf project

How to LaTeX diff your Overleaf project

Set up local latex environment

Grab the two versions

  • Download the original version
    • Go to Overleaf > history > find the version > view single version > download project at this version
  • Download the current version
@jreuben11
jreuben11 / graph_theory_concepts.md
Created October 24, 2018 09:34
Graph Theory Concepts

Graph Theory Concepts

@MateoV
MateoV / enable-coredumps.sh
Created June 11, 2015 21:28
How to enable coredumps on an EC2
sudo su
echo "core.%e.%p.%h.%t" > /proc/sys/kernel/core_pattern
ulimit -c unlimited
@matzoe
matzoe / addon.cc
Last active March 18, 2019 11:09
Node.js callback cross threads
// http://nikhilm.github.io/uvbook/threads.html
#include <string>
#include <map>
#include <node.h>
#include <v8.h>
#include <uv.h>
#include <sys/syscall.h>
#include <stdlib.h>
@bart6114
bart6114 / CG.py
Created January 14, 2014 07:57
Column generation with pulp-or (Python)
import random ## to generate the items
from pulp import * ## import pulp-or functions
class MasterProblem:
def __init__(self, maxValue, itemLengths, itemDemands, initialPatterns, problemname):
self.maxValue=maxValue
self.itemLengths=itemLengths
@Kimundi
Kimundi / java_rust_generic.md
Last active March 20, 2024 06:02
A light comparison between Rust and Java generics and type system features.

Introduction

If you are familiar with Java's generics, and are coming to Rust, you might be lead to assume that its generics are working the same way.

However, due to the different type systems, and different implementation details, there are quite a few differences between generic code in both languages.

This document tries to give a short summary about those differences:

Core functionality

Java

@Groxx
Groxx / Groxx's Simple Queue in C minor.c
Created February 21, 2010 05:17
Simplest complete queue implementation I've yet seen in C.
/*
Implementation by Groxx, with absolutely no guarantees, so don't complain to me if it breaks stuff.
Feel free to use it for awesome, as needed. Apply liberally, and induce vomiting if you ingest large doses.
Note from #0d15eb: BREAKING CHANGE FROM #1d1057: this is now a generic storage, storing pointers to data. Manage your memory accordingly.
Note: now stores the "next" pointer prior to processing, allowing you to process and pop the first item in the list in one pass without losing your place in the queue (and possibly other shenanigans, this one was just handy for my uses so I changed it).
*/
typedef void * queue_data_type;
struct queue_item {
queue_data_type contents;