Skip to content

Instantly share code, notes, and snippets.

@Tak31337
Tak31337 / mazesolver.py
Created April 4, 2013 20:21
Solve ascii mazes with recursive python :)
#!/usr/bin/env python3
'''
This program will first analyze the maze and fill out a two dimensional list with elements
contained within the input file, making note of the start point
The program will then explore neighboring cells from the start location starting with the right cell
by passing the location to a method which will process the cell, and mark it as explored, or maze solved.
The program will make note if there is more than one exploratory juxtaposing cell, and store the cell
location into a list ordered latest found to earliest found, then note cells explored after this into
@aras-p
aras-p / preprocessor_fun.h
Last active July 16, 2024 02:50
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@wesleybliss
wesleybliss / gist:6719458
Created September 26, 2013 19:40
Prepend smile/frown face to command prompt based on command execution result.
PS1="\w \`if [ \$? = 0 ]; then echo -e '\[\e[01;32m\]\n^_^'; else echo -e '\[\e[01;31m\]\n>_<'; fi\` \[\e]0;\w\a\] \[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\\$\n"
@namuol
namuol / INSTALL.md
Last active July 24, 2023 11:53
rage-quit support for bash

rage-quit support for bash

HOW TO INSTALL

Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.

@lelandrichardson
lelandrichardson / ko-convenience.js
Created March 5, 2014 01:11
Knockout.js Custom Utility Bindings
(function (ko, handlers, unwrap, extend) {
"use strict";
extend(handlers, {
href: {
update: function (element, valueAccessor) {
handlers.attr.update(element, function () {
return { href: valueAccessor() };
});
}
},