Skip to content

Instantly share code, notes, and snippets.

View nltncsr's full-sized avatar

Nilton nltncsr

  • Parnaíba, Brazil
View GitHub Profile
@nltncsr
nltncsr / Preferences.sublime-settings
Created August 18, 2014 12:30
My preferences file from ST3
{
"theme": "Spacegray.sublime-theme",
"color_scheme": "Packages/Theme - Spacegray/base16-ocean.dark.tmTheme",
"spacegray_tabs_font_normal": true,
"bold_folder_labels": true,
"caret_style": "smooth",
"highlight_line": true,
"font_size": 9,
"rulers": 80,
"ignored_packages":
@nltncsr
nltncsr / killingmachine.zsh-theme
Created August 29, 2014 05:25
My personal ZSH theme file (Avit theme-based)
#killingmachine
PROMPT='
${_current_dir} $(git_prompt_info) $(_ruby_version)
$(_user_host): '
PROMPT2='%{$fg[grey]%}◀%{$reset_color%} '
RPROMPT='$(_vi_status)%{$(echotc UP 1)%}$(_git_time_since_commit) $(git_prompt_status) ${_return_status}%{$(echotc DO 1)%}'
function EventEmitter() {
this.events = {};
var instance = this;
this.on = function(e, callback) {
instance.events[e] = callback;
};
this.emit = function(e) {
var args = Array.prototype.slice.call(arguments, 1);
@nltncsr
nltncsr / dom-elements-factory.js
Created March 16, 2017 22:25
A function that creates DOM elements given its tag name, classes and attributes
const newEl = function(tag, classes, attrs) {
let el = document.createElement(tag);
if(classes) {
if(typeof(classes) === 'string')
el.classList.add(classes)
else
classes.forEach((c) => el.classList.add(c))
};