Skip to content

Instantly share code, notes, and snippets.

Avatar
🐍🦀

Alper Cugun alper

🐍🦀
View GitHub Profile
@alper
alper / config.fish
Last active Oct 14, 2020
Fish configuration
View config.fish
set -x LC_ALL en_US.UTF-8
set -x LANG en_US.UTF-8
# https://github.com/oh-my-fish/theme-bobthefish
set -g theme_date_format "+%d %H:%M"
set -g theme_date_timezone Europe/Berlin
# Pyenv provided by: https://github.com/oh-my-fish/plugin-pyenv
View covid-meldingen-26-8-8-9
Gemnr;Gemeente;Bev_2020;van_datum;tot_datum;Totaal_Absoluut;Totaal_inc100000;Zkh_Absoluut;Zkh_inc100000;Overleden_Absoluut;Overleden_inc100000
518;'s-Gravenhage (gemeente);545838;26-8-2020;8-9-2020;799;146,4;3;0,5;1;0,2
796;'s-Hertogenbosch;155111;26-8-2020;8-9-2020;58;37,4;0;0;1;0,6
1680;Aa en Hunze;25445;26-8-2020;8-9-2020;0;0;0;0;0;0
358;Aalsmeer;31859;26-8-2020;8-9-2020;21;65,9;0;0;0;0
197;Aalten;27121;26-8-2020;8-9-2020;7;25,8;0;0;0;0
59;Achtkarspelen;27843;26-8-2020;8-9-2020;0;0;0;0;0;0
482;Alblasserdam;20165;26-8-2020;8-9-2020;9;44,6;0;0;0;0
613;Albrandswaard;25590;26-8-2020;8-9-2020;15;58,6;0;0;0;0
361;Alkmaar;109436;26-8-2020;8-9-2020;27;24,7;0;0;0;0
@alper
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
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
alper / Test-cmpcodesize.sh
Created Jan 30, 2018
Relevant commands for cmpcodesize that still need to work
View Test-cmpcodesize.sh
#!/bin/sh
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"
./cmpcodesize.py -a
./cmpcodesize.py -a -p > out_a.csv
./cmpcodesize.py -c
./cmpcodesize.py -c -p > out_c.csv
@alper
alper / simple-git-branching-model.md
Last active Oct 22, 2021 — forked from jbenet/simple-git-branching-model.md
Normative git branching model based on rebasing and best practices
View simple-git-branching-model.md

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: https://developer.apple.com/downloads and then do the install homebrew here: http://mxcl.github.com/homebrew/
  2. Open Terminal.app
  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: git@github.com:whatsthehubbub/victoryboogiewoogie.git use the Mac client: http://mac.github.com/
  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