This file contains hidden or 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
| #!/usr/bin/env ruby | |
| # Remove all gems EXCEPT defaults :) | |
| `gem list -d`.split(/\n\n^(?=\w)/).each do |data| | |
| match = data.match(/(?<name>([^\s]+)) \((?<versions>.*)\)/) | |
| name = match[:name] | |
| versions = match[:versions].split(', ') | |
| if match = data.match(/^.*\(([\d\.]*),? ?default\): .*$/) | |
| next if match[1].empty? # it's the only version if this match is empty |
This file contains hidden or 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
| .text-hide | |
| { | |
| text-indent: 100em; | |
| text-transform: capitalize; | |
| overflow: hidden; | |
| white-space: nowrap; | |
| display: block; | |
| } |
This file contains hidden or 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
| window.onload = function () { | |
| var element = document.body; | |
| var attr = document.createAttribute('class'); | |
| attr.nodeValue = 'ie7'; | |
| element.setAttributeNode(attr); | |
| }; |
This file contains hidden or 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
| @font-face { | |
| font-family: 'font_desejada'; | |
| src: url('font_desejada.eot'); | |
| src: url('font_desejada?#iefix') format('embedded-opentype'), | |
| url('font_desejada.woff') format('woff'), | |
| url('font_desejada.ttf') format('truetype'), | |
| url('font_desejada.svg#font_desejada') format('svg'); | |
| font-weight: normal; | |
| font-style: normal; |
This file contains hidden or 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 str_pad (input, pad_length, pad_string, pad_type) { | |
| // * example 1: str_pad('', 30, '-=', 'STR_PAD_LEFT'); | |
| // * returns 1: '-=-=-=-=-=-foo bar milk' | |
| // * example 2: str_pad('foo bar milk', 30, '-', 'STR_PAD_BOTH'); | |
| // * returns 2: '------foo bar milk-----' | |
| var half = '', | |
| pad_to_go; |
This file contains hidden or 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
| Array.prototype.inArray = function (value) | |
| { | |
| var i; | |
| for (i=0; i < this.length; i++) | |
| { | |
| if (this[i] == value) | |
| { | |
| return true; | |
| } |
This file contains hidden or 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
| //trim completo | |
| String.prototype.trim = function () { | |
| return this.replace(/^\s+|\s+$/g,""); | |
| } | |
| //left trim | |
| String.prototype.ltrim = function () { | |
| return this.replace(/^\s+/,""); | |
| } |
NewerOlder