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 | |
function humanReadable { | |
if [ $1 -lt 1024 ] | |
then | |
printf "%4i B\n" $1 | |
else | |
postfixes=(KiB MiB GiB TiB EiB PiB YiB ZiB) | |
bytes=$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
/* Creates that transparent background texture used by many image editing programs like gimp or PhotoShop */ | |
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABlBMVEW/v7////+Zw/90AAAAE0lEQVR4AWOAAUYoGCCBAbcfCgBFEACB1bzUwAAAAABJRU5ErkJggg==); |
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
#### PROJECT SETTINGS #### | |
# 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 | |
DOC_NAME := PROG-doc | |
# Compiler used |
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
--- | |
BasedOnStyle: LLVM | |
Language: Cpp | |
IndentWidth: 8 | |
UseTab: Always | |
BreakBeforeBraces: Linux | |
AlwaysBreakBeforeMultilineStrings: true | |
AllowShortIfStatementsOnASingleLine: false | |
AllowShortLoopsOnASingleLine: false | |
AllowShortFunctionsOnASingleLine: false |
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
out/ | |
.idea/ | |
*.iml |
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
import java.util.*; | |
public class AdditionUnderXOR { | |
static final int SS = 1000000; | |
enum Ore { | |
COAL(60005), | |
IRON(60006), |
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 python | |
# -*- coding: utf-8 -*- | |
# | |
# This is how I used it: | |
# $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history | |
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
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 |