Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View BrainStone's full-sized avatar

Yannick Schinko BrainStone

View GitHub Profile
import java.util.*;
public class AdditionUnderXOR {
static final int SS = 1000000;
enum Ore {
jellium /
Last active January 15, 2022 20:32 — forked from muendelezaji/
Convert Bash history to Zsh history
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This is how I used it:
# $ cat ~/.bash_history | python >> ~/.zsh_history
import sys
import time
cengiz-io / linux-clang-format
Last active July 23, 2020 11:16 — forked from qlyoung/linux-clang-format
Linux kernel style .clang-format
BasedOnStyle: LLVM
Language: Cpp
IndentWidth: 8
UseTab: Always
BreakBeforeBraces: Linux
AlwaysBreakBeforeMultilineStrings: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
BrainStone / Makefile
Last active April 5, 2017 14:37
Super generic Makefile for C++
# Must be either executable, dynamic_library or static_library
# Defaults to executable if a wrong value is used!
BIN_TYPE = executable
# The name of the executable to be created
# The extension gets appended automatically based on the type
BIN_NAME := prog
# The name of the documentation file
# Compiler used
BrainStone / transbg.css
Created June 30, 2015 22:14
Transparent backgound texture for CSS
/* Creates that transparent background texture used by many image editing programs like gimp or PhotoShop */
BrainStone /
Last active August 29, 2015 14:23
Covert bytes to a human readable format in bash
#! /bin/bash
function humanReadable {
if [ $1 -lt 1024 ]
printf "%4i B\n" $1
postfixes=(KiB MiB GiB TiB EiB PiB YiB ZiB)
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote