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
/* | |
* DO WHAT THE F*** YOU WANT TO PUBLIC LICENSE | |
* Version 2, December 2004 | |
* | |
* Copyright (C) 2013- ZwodahS([email protected]) | |
* zwodahs.github.io | |
* | |
* Everyone is permitted to copy and distribute verbatim or modified | |
* copies of this license document, and changing it is allowed as long | |
* as the name is changed. |
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
def generate_maze(x, y, config={}): | |
structure = [] | |
for i in range(x): | |
l = [] | |
for j in range(y): | |
l.append(6) | |
structure.append(l) | |
maze = { | |
"x" : x, |
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
//// General stuffs //// | |
initscr(); // "start curses" | |
endwin() ; // "end curses" | |
//// Windowing //// | |
WINDOW* window = newwin(height, width, startY, startX) | |
//// Draw /// | |
refresh() | |
wrefresh(window) |
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
std::string& replaceString(std::string& newString, const std::string& searchString, const std::string& replaceString, const bool& multipleReplace) | |
{ | |
size_t index = newString.find(searchString); | |
if(multipleReplace) | |
{ | |
while(index != std::string::npos) | |
{ | |
// replace | |
newString.replace(index, searchString.size(), replaceString); | |
// start searching from the end of the replaceString, such that the replaceString will never be part of the search |
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
c_cyan=`tput setaf 6` | |
c_red=`tput setaf 1` | |
c_green=`tput setaf 2` | |
c_sgr0=`tput sgr0` | |
parse_git_branch () | |
{ | |
if git rev-parse --git-dir >/dev/null 2>&1 | |
then | |
gitver=$(git branch 2>/dev/null| sed -n '/^\*/s/^\* //p') |
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
" DO WHAT THE **** YOU WANT TO PUBLIC LICENSE | |
" Version 2, December 2004 | |
" | |
" Copyright (C) 2013 ZwodahS([email protected]) | |
" zwodahs.wordpress.com | |
" | |
" Everyone is permitted to copy and distribute verbatim or modified | |
" copies of this license document, and changing it is allowed as long | |
" as the name is changed. | |
" |
NewerOlder