- Needed to patch fastimport (see fastimport.patch)
- Switch to bzr directory
git init
bzr fast-export --plain . | git fast-import
rm -rf .bzr
git log --format=%H --first-parent > hashes
tac hashes | tail -n +2 > reversed_hashes
- Determine initial commit (we'll refer to it as $initial_commit)
git checkout $initial_commit
- `git checkout -b top-level-commits
This file contains 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
const cities = ['Tokyo', 'London', 'Rome', 'Donlon', 'Kyoto', 'Paris'] | |
// Initially I misunderstood the problem and assumed that the letters | |
// could be reconfigured in any order to be a match | |
function sameLetters(city1, city2) { | |
if (city1.length !== city2.length) return false | |
for (let i = 0; i < city1.length; ++i) { | |
if (!city2.includes(city1[i])) return false | |
city2 = city2.replace(city1[i], '') | |
} |
This file contains 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 | |
# | |
# PostgreSQL Backup Script Ver 1.0 | |
# http://autopgsqlbackup.frozenpc.net | |
# Copyright (c) 2005 Aaron Axelsen <[email protected]> | |
# | |
# This script is based of the AutoMySQLBackup Script Ver 2.2 | |
# It can be found at http://sourceforge.net/projects/automysqlbackup/ | |
# | |
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9 |
This file contains 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 | |
# Arguments: $1 is a directory where the SVN repository already exists | |
# $2 is the remote SVN repo URL | |
# $3 is the URL to the Gitlab site | |
# $4 is the token used to access the Gitlab site | |
# $5 is the Gitlab namespace id new repos will reside in | |
# $6 is the base Gitlab SSH URL (including namespace name) | |
PROJECTS=`ls $1` |
This file contains 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
#!/usr/bin/python3 | |
# Copyright (C) Larry Price 2016 | |
# GPLv3 | |
from pexpect import spawnu as spawn, EOF | |
import subprocess | |
import sys | |
import time |
This file contains 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
#!/usr/bin/env python3 | |
import lxc | |
import time | |
import os | |
CONTAINER_NAME='xenial' | |
CONTAINER_PATH='%s/.cache/libertine-container' % os.environ["HOME"] | |
def lxc_work(): |
This file contains 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
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
type Philosopher struct { | |
Name string | |
} |
This file contains 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
package main | |
import ( | |
"fmt" | |
"sync" | |
"time" | |
) | |
type Philosopher struct { | |
Name string |
This file contains 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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"math" | |
"math/rand" | |
"os" | |
"strconv" | |
"strings" |
This file contains 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
package main | |
import ( | |
"fmt" | |
) | |
type Fetcher interface { | |
// Fetch returns the body of URL and | |
// a slice of URLs found on that page. | |
Fetch(url string) (body string, urls []string, err error) |
NewerOlder