Skip to content

Instantly share code, notes, and snippets.

View cdragos's full-sized avatar
🏠
Working from home

Dragos Catarahia cdragos

🏠
Working from home
  • Funchal, Madeira
View GitHub Profile
@cdragos
cdragos / 0_reuse_code.js
Created October 17, 2016 18:31
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@cdragos
cdragos / arithmetic_parsing.js
Created December 4, 2014 15:00
Arithmetic Parsing Javascript
var expr = '(2-2)-0+7+2-(3)-(3-(6-5))-4';
function peek(stack) {
return stack[stack.length - 1];
}
function Token(value) {
var op = {
'+': {
@cdragos
cdragos / gist:2299991
Created April 4, 2012 09:37
Bootstrap jQuery plugin for creating confirmation dialogs with deferred chainable callbacks and Mustache templates.
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet" />
<title>Bootstrap modal confirm</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>