Skip to content

Instantly share code, notes, and snippets.

View nobitagit's full-sized avatar
🕸️
The less I know the better

Aurelio nobitagit

🕸️
The less I know the better
View GitHub Profile
@nobitagit
nobitagit / Ruby Notepad Bookmarklet
Last active December 11, 2015 22:49 — forked from jakeonrails/Ruby Notepad Bookmarklet
Js Notepad Bookmarklet
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/javascript");</script>
@nobitagit
nobitagit / gist:4672371
Last active December 11, 2015 22:49
Freetext bookmarklet
data:text/html,<title>Hello</title><body style="background: #2a2a2a;"><textarea style="font-size: 1.5em; line-height: 1.8em; color:#aaa; width: 100%; height: 100%; border: none; outline: none; padding: 20px; background: #333;" placeholder="Welcome_" autofocus />
@nobitagit
nobitagit / gist:5498647
Created May 1, 2013 21:47
Solving Euler Project problems in Javascript.
/*
PROBLEM 1 - http://projecteuler.net/problem=1
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9.
The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000.
*/
var i= 0,
myNums;
/*!
* jQuery Tiny Pub/Sub - v0.X - 11/18/2010
* http://benalman.com/
*
* Original Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*
* Made awesome by Rick Waldron
*
@nobitagit
nobitagit / evt-delegation.js
Created June 16, 2014 14:29
Proper Js event delegation, handling parents of clicked elements
/*
Proper event delegation without targeting errors
Given the structure:
<ul>
<li><div class="d"></div></li>
<li><div class="d"></div></li>
<li><div class="d"></div></li>
<li><div class="d"></div></li>
<li><div class="d"></div></li>
@nobitagit
nobitagit / .bash_profile
Last active August 19, 2017 22:22
My terminal bash profile
# nvm config
export NVM_DIR=~/.nvm
source $(brew --prefix nvm)/nvm.sh
PINK=$'\e[35;40m'
GREEN=$'\e[32;40m'
YELLOW=$'\e[33;40m'
RED=$'\e[0;31m'
# use node 4 as default
@nobitagit
nobitagit / gist:e7e390a4737aa69408df
Created July 15, 2014 13:01
Distribute images along a cricle
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
*,
*:before,
*:after {
@nobitagit
nobitagit / customeEvents.js
Created November 19, 2014 08:36
Creating an event in javascript and firing it programmatically
// creating an event and firing it programmatically
document.addEventListener('change', function(e) {
console.log(e.someProp);
});
var event1 = document.createEvent('HTMLEvents');
event1.initEvent('change',true,false);
event1.someProp = 'yourPropHere';
inputEl.dispatchEvent(event1);
@nobitagit
nobitagit / sublime-settings.json
Last active August 29, 2015 14:09
my Sublime settings
{
"auto_match_enabled": true,
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/User/Solarized (Dark) (SL).tmTheme",
"create_window_at_startup": false,
"detect_slow_plugins": false,
"drag_text": false,
"font_options": "subpixel_antialias",
"font_size": 18.9,
@nobitagit
nobitagit / SassMeister-input.scss
Created February 6, 2015 18:02
Generated by SassMeister.com.
// ----
// Sass (v3.4.11)
// Compass (v1.0.3)
// ----
/**
* CONTENTS
*
* #Introduction........Naming conventions used throughout the code.
*