- Bowerjs - install dependences
- Gruntjs - server run
- yeoman - scaffold generator
- Install via RVM(Ruby version manager)
install RVM
-sudo apt-get install curl
- gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
-\curl -sSL https://get.rvm.io | bash -s stable
Load RVM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo '<!DOCTYPE html> | |
<html lang="es"> | |
<head> | |
<style type="text/css"> | |
body{font-size: 12px; font-family: monospaced} | |
ul, li{list-style-type: none} | |
textarea{ | |
width: 300px; | |
height: 300px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User | |
STATUS = {active: "Active", inactive: "Inactive", invited:"Invited"} | |
STATUS.each_with_index do |(meth, value)| | |
define_method("is_#{meth}?"){status == value} | |
end | |
def initialize(name, email, password, status) | |
@name = name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Jekyll | |
class Terminal < Liquid::Block | |
def initialize(tag_name, text, tokens) | |
super | |
@text = text | |
end | |
def render(context) | |
text = super.gsub("\n", "<br/>") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var holidays =[] | |
//holiday model ruby, table that save all the holidays federal | |
holidays = "<%= Holiday.all.map{ |h| h.date.strftime("%Y-%m-%d") } %>"; | |
/*example "2015-10-12", "2015-11-02", "2015-11-16", "2015-12-08", "2015-12-25", "2016-01-01", | |
"2016-01-11", "2016-03-21", "2016-03-24", "2016-03-25", "2016-05-01", "2016-05-09", "2016-05-30", | |
"2016-06-06", "2016-07-04", "2016-07-20", "2016-08-07", "2016-08-15", "2016-10-17", "2016-11-07", | |
"2016-11-14", "2016-12-08", "2016-12-25"]*/ | |
$('.date').datepicker({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def date_diff(date1, date2) | |
month = (date2.year * 12 + date2.month) - (date1.year * 12 + date1.month) | |
month.divmod(12) | |
end | |
#for get the years | |
date_diff(date, Date.today)[0] | |
#for get the months | |
date_diff(date, Date.today)[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
// Better performance in replacing js in any browsers. http://jsperf.com/encode-html-entities | |
if($.browser.name != "chrome") { | |
var tagsToReplace = { | |
'&': '&', | |
'<': '<', | |
'>': '>', | |
' ': ' ', | |
'#': '<root>[root@localhost]# </root>', | |
'$': '<user>[user@localhost]$ </user>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
$.fn.sortable = function (options){ | |
options = $.extend({ | |
url: null | |
}, options); | |
return this.each(function (){ | |
var handle = $(this); | |
var items = handle.children(options.items); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
OlderNewer