Skip to content

Instantly share code, notes, and snippets.

🕶

Amadeus Demarzi amadeus

🕶
Block or report user

Report or block amadeus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View nanobot.js
/** nanobot */
var Nanobot = function(game, x, y) {
// extends
Phaser.Sprite.call(this, game, x * pxr, y * pxr, 'nanobot', 'nanobot-180');
// members
this.hoverBase = 6;
this.hoverEffect = game.add.tween(this);
View detectindent-settings.vim
" FIXME: Set these 2 lines to your preferred liking
let g:detectindent_preferred_expandtab = 0
let g:detectindent_preferred_indent = 4
let g:detectindent_max_lines_to_analyse = 1024
augroup detectindent
autocmd!
autocmd BufReadPost * :DetectIndent
augroup END
View ctrlp-settings.vim
let g:ctrlp_working_path_mode = 0
let g:ctrlp_match_window = 'bottom,order:btt,min:1,max:20,results:20'
let g:ctrlp_cache_dir = $HOME.'/.vim/cache/ctrlp'
let g:ctrlp_switch_buffer = 'e'
let g:ctrlp_open_new_file = 'r'
let g:ctrlp_clear_cache_on_exit = 0
let g:ctrlp_max_files = 10000
let ctrlp_filter_greps = "".
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Events Example</title>
<meta name="viewport" content="width=device-width,user-scalable=no">
<style type="text/css">
html, body {
-webkit-tap-highlight-color:transparent;
-moz-tap-highlight-color:transparent;
-ms-tap-highlight-color:transparent;
View index.html
<html>
<head>
<title>Learning WebGL &mdash; lesson 3</title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<script type="text/javascript" src="glMatrix-0.9.5.min.js"></script>
<script type="text/javascript" src="webgl-utils.js"></script>
<script id="shader-fs" type="x-shader/x-fragment">
View quickSplice.js
var quickSplice = function quickSplice(arr, index){
var len = arr.length;
if (len) {
while (index < len){
arr[index++] = arr[index];
}
--arr.length;
}
};
View file.css
img[src$=".gif"],
img[src$=".png"] {
image-rendering: -moz-crisp-edges; /* Firefox */
image-rendering: -o-crisp-edges; /* Opera */
image-rendering: -webkit-optimize-contrast;/* Webkit (non-standard naming) */
image-rendering: crisp-edges;
-ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */
}
View InvertFilter.js
/**
* @author Mat Groves http://matgroves.com/ @Doormat23
*/
/**
* This inverts your Display Objects colors.
*
* @class InvertFilter
* @extends AbstractFilter
* @constructor
@amadeus
amadeus / BinaryHeap.js
Created Apr 18, 2014
Dose Binary Heaps tho...
View BinaryHeap.js
function BinaryHeap(scoreFunction){
this.content = [];
this.scoreFunction = scoreFunction;
}
BinaryHeap.prototype = {
push: function(element) {
this.content.push(element);
this.bubbleUp(this.content.length - 1);
View typewriter.js
(function(){
this.Terminal = function(container, steps){
this.container = document.getElementById(container);
this.steps = steps;
this.cycle = this.cycle.bind(this);
this.cycle();
};
this.Terminal.prototype.cycle = function(){
You can’t perform that action at this time.