Skip to content

Instantly share code, notes, and snippets.

☕️
in your codebase

Alper Cugun alper

☕️
in your codebase
Block or report user

Report or block alper

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@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
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
View index.html
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="jquery.tipsy.js"></script>
<link href="tipsy.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="chart"></div>
@alper
alper / Example output.txt
Created Nov 29, 2012
A* routing for a connection graph of Yorckstraße
View Example output.txt
neighbors of S1NordS ['GG', 'S1NordN', 'U7S']
path from GG to U7S
['GG', 'S1NordS', 'U7S']
path from GG to S25
['GG', 'S1NordS', 'U7S', 'S25']
[Finished in 0.1s]
GG = Großgörchenstraße
S1NordS = S1 North Exit South of the road
S1NordN = S1 North Exit North of the road
View lawnl.py
#
from suds.client import Client
from suds.xsd.doctor import ImportDoctor, Import
wsdlURL = 'http://wetten.overheid.nl/BWBIdService/BWBIdService.wsdl'
imp = Import('http://schemas.xmlsoap.org/soap/encoding/')
doctor = ImportDoctor(imp)
@alper
alper / gist:3749030
Created Sep 19, 2012 — forked from gnunicorn/gist:3748738
Git for Beginners: Call for Coaches
View gist:3749030

The OpenTechSchool has set up and hosted a few tech workshops and meetups here in Berlin now. Aside from the monthly Beginners Meetup and hosting the Udacity Global Meetup we hosted workshops for program beginners in Python and Javascript on our own and on the premise of CampusParty.

One thing that was extraordinary popular on CampusParty was the Workshop on Git for beginners. And we decided to do it again, this time with a closer focus on version control as a major benefit in code sharing (by using git and github) for beginners - free of charge.

So if you are interested in

You can’t perform that action at this time.