Skip to content

Instantly share code, notes, and snippets.

View IOExceptional's full-sized avatar

Lee Walker IOExceptional

View GitHub Profile
@IOExceptional
IOExceptional / async.html
Created February 1, 2015 06:30
Asynchronous JavaScript is a lie!
<html>
<head>
<title>JsTestBed</title>
</head>
<body>
<h2>"Async" test</h2>
<p>
In JavaScript, asynchronous calls are a lie!<br />
What actually happens is the setTimeout(func, 0); gets put on the end of the call list.<br />
Any direct javascript functions will get prioritised and run before the function in the timeout.
@IOExceptional
IOExceptional / sublime packages
Last active August 29, 2015 14:21
My sublime packages
brogrammer theme
GitGutter
meteor autocomplete (ternjs)
color highlighter
LESS
javascript next ES6
handlebars
sublimelinter
sublimelinter-jshint
@IOExceptional
IOExceptional / rowFilter.js
Created June 11, 2015 15:05
A simple, effective multi-dimensional row filtering script
var filter;
(function () {
filter = function (searchBox, targetClass) {
var value = searchBox.value;
var hiddenClass = targetClass + "SearchHidden";
//Nothing in the box, remove <targetclass>searchhidden class
if (value.length < 1) {
$("." + hiddenClass).removeClass(hiddenClass);
@IOExceptional
IOExceptional / persistentRowFilter.js
Created June 11, 2015 15:49
A more advanced row filter with localstorage persistence
var addFilter;
(function () {
var filter = function (searchBox, targetClass) {
var value = searchBox.value;
var hiddenClass = targetClass + "SearchHidden";
var cacheArray = JSON.parse(localStorage.getItem(hiddenClass));
cacheArray = [];
localStorage.setItem(hiddenClass, JSON.stringify(cacheArray));
@IOExceptional
IOExceptional / steamFriendsLinkGrabber.js
Last active August 29, 2015 14:25
Steam Friends List Link Grabber
var profiles = document.getElementsByClassName('friendBlockLinkOverlay');
var linkText = "";
for( var i = 0; i < profiles.length; i++) { linkText += "\r\n" + profiles[i].href; }
console.dir(linkText);
@IOExceptional
IOExceptional / packages.json
Created September 24, 2015 15:06
Atom Packages
atom-beautify
atom-monokai
atom-yeoman
auto-detect-indentation
autoclose-html
autocomplete-paths
es6-javascript
git-plus
highlight-selected
linter
@IOExceptional
IOExceptional / WhatsWrong.directive.js
Created February 15, 2016 14:01
There's something that behaves strangely in this code, what's wrong? Tip: Mutable variables and closures.
var doStuff = function($scope) {
var model = [];
var items = $scope.items;
for(var i = 0; i < items.length; i++) {
var source = items[i];
doAsyncThings().then(function(newValue){
model[i].src = newValue;
});
@IOExceptional
IOExceptional / codedui.cs
Last active March 1, 2016 15:00
A coded ui to test in a rough area for a while
Random rnd = new Random();
for(int i = 0; i < 1000; i++)
{
bool movement = rnd.NextInt(0, 10) > 9;
int x = 635 + (movement ? rnd.NextInt(-3, 3) : 0);
int y = 295 + (movement ? rnd.NextInt(-3, 3) : 0);
Mouse.MoveTo(x, y);
Mouse.Click();
Process.Wait(rnd.NextInt(1500, 3000));
#dockerhub instance
image: didstopia/sdl2:latest
pipelines:
default:
- step:
script: # Modify the commands below to build your repository.
- mkdir bin
- make
@IOExceptional
IOExceptional / git-prompt.sh
Created October 31, 2018 10:13
My windows "Program Files\Git\etc\profile.d\git-prompt.sh"
if test -f ~/.config/git/git-prompt.sh
then
. ~/.config/git/git-prompt.sh
else
PS1='\[\033]0;$PWD\007\]' # set window title
PS1="$PS1"'\n' # new line
PS1="$PS1"'\[\033[32m\]' # change to green
PS1="$PS1"'\u ' # user@host<space>
PS1="$PS1"'\[\033[35m\]' # change to purple
PS1="$PS1"'\w' # current working directory