Skip to content

Instantly share code, notes, and snippets.

View ProLoser's full-sized avatar

Dean Sofer ProLoser

View GitHub Profile
@ProLoser
ProLoser / Controls.con
Created January 7, 2011 05:42
Battlefield 2 Controls File::: My Documents/Battiefield 2/Profiles/[profile####]/Controls.con
ControlMap.create InfantryPlayerInputControlMap
ControlMap.addKeysToAxisMapping c_PIYaw IDFKeyboard IDKey_D IDKey_A 0
ControlMap.addKeysToAxisMapping c_PIThrottle IDFKeyboard IDKey_W IDKey_S 0
ControlMap.addButtonToTriggerMapping c_PIFire IDFMouse IDButton_0 0 0
ControlMap.addButtonToTriggerMapping c_PIFire IDFFalcon IDButton_0 0 1
ControlMap.addKeyToTriggerMapping c_PIAction IDFKeyboard IDKey_Space 10000 0
ControlMap.addKeyToTriggerMapping c_PIAltSprint IDFKeyboard IDKey_W 1000 0
ControlMap.addKeyToTriggerMapping c_PISprint IDFKeyboard IDKey_LeftShift 0 0
ControlMap.addKeyToTriggerMapping c_PIWeaponSelect1 IDFKeyboard IDKey_1 10000 0
ControlMap.addKeyToTriggerMapping c_PIWeaponSelect2 IDFKeyboard IDKey_2 10000 0
@ProLoser
ProLoser / dabblet.css
Created March 15, 2012 00:19
Facebook Timeline in CSS
/**
* Facebook Timeline in CSS
*/
* {
box-sizing: border-box;
}
body {
background: #f06;
background: linear-gradient(45deg, #fff, #fff);
min-height:100%;
@ProLoser
ProLoser / alerts.html
Last active October 9, 2019 18:38
AngularJS Bootstrap implemented without any additional code
<h1>Alert</h1>
<p>Bootstrap JS</p>
<div class="alert fade in">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>Holy guacamole!</strong> Best check yo self, you're not looking too good.
</div>
<p></p><a ng-click="alert=true">Open Alert (AngularJS)</a></p>
<div class="alert fade" ng-class="{in:alert}">
<button type="button" class="close" ng-click="alert=false">×</button>
@ProLoser
ProLoser / $scope.$apply().js
Created July 19, 2013 17:19
AngularJS: When to use $scope.$apply()?
/*** BAD: ***
* Never put $scope.$apply() deep down a call stack
* You may end up calling the same method inside a
* $digest, and find yourself using $scope.$$phase
* or $timeout to hack around it.
*/
setTimeout(function(){
a();
})
elm.bind('click', function(){
@ProLoser
ProLoser / AngularJS-Cachebusting.js
Last active September 10, 2020 12:54
Elegant cache-busting for AngularJS HTML assets
anglar.module('myApp',['ui']).config(["$provide", function($provide) {
return $provide.decorator("$http", ["$delegate", function($delegate) {
var get = $delegate.get;
$delegate.get = function(url, config) {
// Check is to avoid breaking AngularUI ui-bootstrap-tpls.js: "template/accordion/accordion-group.html"
if (!~url.indexOf('template/')) {
// Append ?v=[cacheBustVersion] to url
url += (url.indexOf("?") === -1 ? "?" : "&");
url += "v=" + cacheBustVersion;
}
@ProLoser
ProLoser / bash.org.php
Created September 10, 2013 06:25
Bash.org scraper written in PHP
<?php
$con = mysqli_connect("localhost","root","","password");
if(isset($_GET['scan'])) {
for($i=$_GET['scan'];$i<$_GET['scan']+10;$i++){
$string = file_get_contents('http://bash.org/?browse&p='.$i);
preg_match_all('/<p class="quote"><a href="\?(\d+)".*?>\((-?\d+)\)<.*?<p class="qt">(.*?)<\/p>/si',$string,$matches);
echo '<br>Page '.$i.':';
for($j=0;$j<count($matches[0]);$j++){
@ProLoser
ProLoser / Recruiting.md
Last active April 4, 2017 19:14
Answers to common recruiting questions

Your Questions:

  • Updated Resume?
    PDF Resume
  • What is your availability?
    My Availability Calendar (use my email at the top for invites)
    I prefer scheduling meetings after 10am.
    Please try to avoid unsolicited / unscheduled phone calls.
  • Are you looking for a new job?
    Only in the Video Game industry.
  • What positions are you most interested in?
@ProLoser
ProLoser / config.fish
Last active February 23, 2018 01:41
My OSX fish (oh-my-fish) shell configuration file
# Path to your oh-my-fish.
set fish_path $HOME/.oh-my-fish
# Theme
set fish_theme agnoster
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-fish/plugins/*)
# Custom plugins may be added to ~/.oh-my-fish/custom/plugins/
# Path to your custom folder (default path is $FISH/custom)
@ProLoser
ProLoser / .slate.js
Last active August 29, 2015 14:17
Slate Config
$ = (function() {
$ = function() {
var args = _.toArray(arguments);
var sequence = false;
var func;
if (args.length == 1 && _.isArray(args[0])) {
sequence = true;
} else {
func = args.shift();
}
@ProLoser
ProLoser / focusOn.js
Created November 24, 2015 01:19
Focuses on input/element
/**
* focusOn - Focuses an input on scope event
*
* @example
* <input focus-on="someEventName">
* or
* <input focus-on="focus-row-{{$index}}">
* or
* <p focus-on="anotherEvent"></p>
* ...