Skip to content

Instantly share code, notes, and snippets.

View amadeus's full-sized avatar
🕶️
out here livin

Amadeus Demarzi amadeus

🕶️
out here livin
View GitHub Profile
(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(){
for (var key = 0, value; value = someArray[key++];) {
// value is already defined by for loop
console.log('index: ' + key, 'value: ' + value);
}
var num = 1;
var num2 = num;
num++;
console.log(num); // 2
console.log(num2); // 1
var obj = {
val: 'A string'
};
(function(){
var obj = {
name: 'No Name'
};
window.setName = function(name){
obj.name = name;
};
{
guiEnabled: true,
draw: function(){
this.parent();
if (this.guiEnabled) {
this.drawGUI();
}
},
var Settings = Class.$extend({
chart: {
type: 'spline'
},
title: {
text: null
},
xAxis: {
title: {
text: "Time (sec)",
var template = [
'<div>',
'<h1>{title}</h1>',
'<p>{content}</p>',
'</div>'
].join('');
" TESTING: Toggle whitespace save
function! ToggleWhitespaceSave()
if exists('b:pw') && b:pw == 1
unlet b:pw
echo 'Stripping whitespace on save'
else
let b:pw = 1
echo 'Preserving whitespace on save'
endif
endfunction
function! SynStack()
echo join(map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")'), " > ")
endfunc
nnoremap <F7> :call SynStack()<CR>
@amadeus
amadeus / .vimrc
Last active December 21, 2015 05:18
" My First .vimrc
" Run this command in Terminal to setup Vundle and appropriate directories:
" mkdir ~/.vim ~/.vim/bundle; git clone https://github.com/gmarik/vundle.git .vim/bundle/vundle
" Always set nocompatible, seriously
set nocompatible
" Required for Vundle
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()