This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -ex | |
# | |
# Push the current repository to GitHub, in small enough chunks that it | |
# won't exceed the pack-size limit | |
# Commit to start with, counting from the oldest. If the process fails, | |
# you can change this variable to restart from where it failed. | |
START_COMMIT=1000 | |
# Number of commits to push at a time, counting from the oldest. If a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ruby 2.3.1 recomended | |
require 'set' | |
class Graph | |
attr_reader :graph, :nodes, :previous, :distance #getter methods | |
INFINITY = 1 << 64 | |
def initialize | |
@graph = {} # the graph // {node => { edge1 => weight, edge2 => weight}, node2 => ... | |
@nodes = Set.new |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> | |
#include <sys/mman.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <stdlib.h> | |
#define CHECK(thing) if (!(thing)) { perror(#thing); exit(1); } | |
#define MAX_PAGE_IN 104857600 |