Skip to content

Instantly share code, notes, and snippets.

View AlexBezuska's full-sized avatar

Alex Bezuska AlexBezuska

  • Louisville, Kentucky (KY)
View GitHub Profile
//works on my local machine, white screens the server
echo str_replace( ['<ul>','</ul>'], '', $string );
//works great on both
echo str_replace( array('<ul>','</ul>'), '', $string );
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -GFh'
xcodebuild -target "~/projects/mine/Ejecta/Kick Bot.xcodeproj" -scheme "Ejecta" -configuration "Release" -sdk iphoneos7.1 -arch "armv7" CONFIGURATION_BUILD_DIR="TestBuild" ONLY_ACTIVE_ARCH=NO
/* MDP Color Pack */
$reports-light-blue: rgba( 94,125,172,1);
$reports-blue: rgba( 74,108,158,1);
$light-grey-blue: rgba( 70, 91,113,1);
$grey-blue: rgba( 58, 78, 99,1);
$mortenson-blue: rgba( 24, 79,166,1);
$make-it-grey: rgba( 70, 70, 70,1);
$dark-grey: rgba( 70, 70, 70,1);
$not-black: rgba( 27, 29, 30,1);
@AlexBezuska
AlexBezuska / 2014 NCAA men's bracket JSON
Created March 19, 2014 21:31
2014 NCAA men's basketball tournament bracket in JSON format. In same order as bracket pdfs
{
"teams":{
"1":{
"seed":"1",
"name":"Florida",
"record":"32–2",
"rank":"1"
},
"2":{
"seed":"16",
!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Splat=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
var Entity = _dereq_("./entity");
function AnimatedEntity(x, y, width, height, sprite, spriteOffsetX, spriteOffsetY) {
this.sprite = sprite;
this.spriteOffsetX = spriteOffsetX;
this.spriteOffsetY = spriteOffsetY;
Entity.call(this, x, y, width, height);
}
AnimatedEntity.prototype
@AlexBezuska
AlexBezuska / CrustMail Beta
Last active January 4, 2016 07:09
Emailer for shell scripts
#!/bin/bash
logo() {
cat <<"EOT"
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
______ ______ __ __ ______ ______ __ __ ______ __ __
/\ ___\ /\ == \ /\ \/\ \ /\ ___\ /\__ _\ /\ --./ \ /\ __ \ /\ \ /\ \
\ \ \____ \ \ __< \ \ \_\ \ \ \___ \ \/_/\ \/ \ \ \-./\ \ \ \ __ \ \ \ \ \ \ \____
\ \_____\ \ \_\ \_\ \ \_____\ \/\_____\ \ \_\ \ \_\ \ \_\ \ \_\ \_\ \ \_\ \ \_____\
@AlexBezuska
AlexBezuska / Server Backup Shell Script
Last active April 30, 2016 04:37
Server Backup script not mine, credit goes to Joshua R Jones
#!/bin/bash
# A Simple Shell Script to Backup Red Hat / CentOS / Fedora / Debian / Ubuntu Apache Webserver and SQL Database
# Path to backup directories
DIRS="/www"
ETC="/etc"
HOME="/home"
# Store todays date
NOW=$(date +"%F")
@AlexBezuska
AlexBezuska / Unity JavaScript 'RayBox' Ray Casting experiment
Created December 17, 2013 04:00
Experiment in casting boxes as rays for unity in javascript. Collision Detection Game Dev
var tName;
// center
public var center : Vector2;
var centerX : float;
var centerY : float;
var height : float;
var halfHeight : float;
var width : float;
@AlexBezuska
AlexBezuska / gist:6969089
Last active December 25, 2015 11:29
Fisher Yates shuffle algorithm in JavaScript, taken from Pratik Deoghare on Stack Overflow. More info on the concept: http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle
function fisherYates(myArray,nb_picks){
for (i = myArray.length-1; i > 1 ; i--){
var r = Math.floor(Math.random()*i);
var t = myArray[i];
myArray[i] = myArray[r];
myArray[r] = t;
}
return myArray.slice(0,nb_picks);
}