Skip to content

Instantly share code, notes, and snippets.

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

Rodnei A. Ribeiro raribeiro

🏠
Working from home
View GitHub Profile
@raribeiro
raribeiro / preferences.json
Last active September 13, 2015 17:49
My sublime preferences
{
"bold_folder_labels": true,
"caret_extra_width": 1,
"caret_style": "phase",
"close_windows_when_empty": false,
"color_scheme": "Packages/User/SublimeLinter/predawn (SL).tmTheme",
"copy_with_empty_selection": false,
"default_line_ending": "unix",
"drag_text": false,
"draw_minimap_border": true,
@raribeiro
raribeiro / key_map.json
Last active August 29, 2015 14:02
My keys sublime
[
{ "keys": ["ctrl+1"], "command": "toggle_menu" },
{ "keys": ["ctrl+alt+f"], "command": "fold" },
{ "keys": ["ctrl+alt+u"], "command": "unfold" }
]
@raribeiro
raribeiro / service.js
Created August 5, 2014 14:39
Service with angularJS
app.factory('searchSchollService', ['$http', '$q', function($http, $q){
var searchSchollService = {};
searchSchollService.get = function(_param){
return $http.get(config.url.school_search(_param)).then(function(result_search){
if(typeof result_search.data === 'object'){
return result_search.data;
@raribeiro
raribeiro / promise_vanilla.js
Last active August 29, 2015 14:14
Pure promise witch javascript.
var promise = new Promise(function(resolve){
var foo;
resolve(foo=1);//event
});
promise.then(function(){
//Execute on done
});
@raribeiro
raribeiro / show_hide.js
Last active August 29, 2015 14:14
Simple show and hidden any component linked with upload in pure Javascript.
/**
* Show or hidden upload degree
*/
//Element action
var elUploadAction = document.getElementById('uploadDefaultButton');
//check if action is true
if(elUploadAction){
@raribeiro
raribeiro / inheritance_pattern.js
Created February 5, 2015 20:37
My simple model of Inheritance Pattern.
function Car(_name, _year) {
this.name = _name;
this.year = _year;
}
Car.prototype.carType = function () {
return "My car is a " + this.name + ", this year is " + this.year + ".";
};
function CarModel(_model, _name, _year) {
<script>
(function(){
'use strict';
/**
* Function to inject Muli
*/
function addFont(){
var style = document.creatElement('style');
style.rel = 'stylesheet';
@raribeiro
raribeiro / packages.txt
Created September 13, 2015 17:49
My sublime packages
Color Highlighter
jQuery
Sass
AngularJS Snippets
Comment-Snippets
LESS
SideBarEnhancements
AngularJS
CSS Snippets
Package Control