Skip to content

Instantly share code, notes, and snippets.


Alper Cugun alper

View GitHub Profile
alper /
Last active Oct 14, 2020
Fish configuration
set -x LC_ALL en_US.UTF-8
set -x LANG en_US.UTF-8
set -g theme_date_format "+%d %H:%M"
set -g theme_date_timezone Europe/Berlin
# Pyenv provided by:
View covid-meldingen-26-8-8-9
518;'s-Gravenhage (gemeente);545838;26-8-2020;8-9-2020;799;146,4;3;0,5;1;0,2
1680;Aa en Hunze;25445;26-8-2020;8-9-2020;0;0;0;0;0;0
alper / seating.snt
Last active Oct 4, 2019
Basic seating arrangement solver
View seating.snt
array2<int> rooms;
# Each room is represented by the maximum number of people that it can seat
rooms = [2, 3, 4, 5];
# People are represented by a list of indexes of the rooms where they sit (ten people in this case)
array10<int> people;
function respectCapacity? (people, roomNumber, capacity) {
alper / prepare-commit-msg
Last active Jun 19, 2019
A git hook that checks whether there is an issue number in the first line of your commit message
View prepare-commit-msg
#!/usr/bin/env python3
import sys
commit_msg_filepath = sys.argv[1]
with open(commit_msg_filepath, 'r+') as fh:
lines = fh.readlines()
if '#' not in lines[0]:
View skipping_codable.swift
// Models.swift
// strw
// Created by Alper Cugun on 23/8/18.
// Copyright © 2018 alper. All rights reserved.
import Foundation
alper /
Created Jan 30, 2018
Relevant commands for cmpcodesize that still need to work
export SWIFT_OLD_BUILDDIR="/Users/alper/Documents/swift-source/build/Ninja-DebugAssert/swift-macosx-x86_64"
export SWIFT_NEW_BUILDDIR="/Users/alper/Documents/swift-source/build/Ninja-ReleaseAssert/swift-macosx-x86_64"
./ -a
./ -a -p > out_a.csv
./ -c
./ -c -p > out_c.csv
alper /
Last active Oct 22, 2021 — forked from jbenet/
Normative git branching model based on rebasing and best practices

a simple git branching model

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

View gist:5189046

How to set up a fresh project (on OS X)

  1. Install homebrew, by getting the commandline tools: and then do the install homebrew here:
  2. Open
  3. Check python is installed by typing python
  4. Install pip if you don't have it sudo easy_install pip
  5. Use pip to install virtualenv (don't ask me why): sudo pip install virtualenv
  6. Find a fresh place to checkout the project: use the Mac client:
  7. In the terminal cd to where you just checked out the project, for instance: cd ~/Documents/projects/sake/victorycheckout
  8. Create a virtual environment if you don't have one yet: virtualenv venv --distribute