Skip to content

Instantly share code, notes, and snippets.

View AgileMantis's full-sized avatar

Brian Ledsworth AgileMantis

View GitHub Profile
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8
@AgileMantis
AgileMantis / bfs_maze_solver.rb
Created July 19, 2012 13:19
Ruby Breadth-first Search algorithm (implemented to solve a maze)
# (The MIT License)
#
# Copyright (c) 2012 Ledsworth Consulting LLC
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
# persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
@AgileMantis
AgileMantis / ember.radio_button_test.html
Created July 7, 2012 13:50
Ember.RadioButtonGroup html test file
<html>
<head>
<script type='text/javascript' src='../../jayferd/ember.js/lib/jquery-1.7.2.js' ></script>
<script type='text/javascript' src='../../jayferd/ember.js/lib/handlebars-1.0.0.beta.6.js' ></script>
<script type='text/javascript' src='../../jayferd/ember.js/dist/ember.js' ></script>
</head>
<body>
<script type='text/javascript'>
@AgileMantis
AgileMantis / minimax_snippet_direct.rb
Created January 5, 2012 14:38
Minimax Algorithm - Direct Recursion
# (The MIT License)
#
# Copyright (c) 2011 Ledsworth Consulting LLC
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
# persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
@AgileMantis
AgileMantis / minimax_snippet.rb
Created December 29, 2011 15:16
Minimax Algorithm
# (The MIT License)
#
# Copyright (c) 2011 Ledsworth Consulting LLC
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
# persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
@AgileMantis
AgileMantis / maze.cpp
Created November 30, 2011 22:28
Maze Alogrithm (No recursion or backtracking)
// (The MIT License)
//
// Copyright (c) 2011 Ledsworth Consulting LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
// documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
@AgileMantis
AgileMantis / slot.sass
Created November 22, 2011 17:01
slot_sass
$red: #ff0000
$black: #000000
$blue: #2222aa
$white: #ffffff
$border: #666666
.no_padding_margin
padding: 0px
margin: 0px
@AgileMantis
AgileMantis / slot.js
Created November 22, 2011 16:56
slot_js
// (The MIT License)
//
// Copyright (c) 2011 Ledsworth Consulting LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
// documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
@AgileMantis
AgileMantis / slot.hmtl
Created November 22, 2011 16:54
slot_html
<div class='machine'>
<div class='machine_body'>
<div class='spin_msg'>[ Click handle to spin ]</div>
<div class='display'>
<table>
<tr><td><span class='red'>7 7 7</span></td><td> 500</td</tr>
<tr><td>= = =</td><td> 400</td</tr>
<tr><td>-&nbsp;&nbsp;-&nbsp;&nbsp;-</td><td> 300</td</tr>
<tr><td><span class='anybar'>any any any<br/ >bar bar bar</td></td><td> 100</td</tr>
</table>