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
class StringCalculator | |
CUSTOM_DELIMITER_REGEXP = Regexp.new("\/\/(\\D)\\n") | |
CUSTOM_LONG_DELIMITER_REGEXP = Regexp.new("\/\/\\[(([^\\]|\\D])+)\\]\\n") | |
MULTIPLE_DELIMITERS_REGEXP = Regexp.new("\/\/(\\[.*\\])\\n") | |
def add(operation) | |
if operation == '' | |
return 0 | |
end |
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
module A | |
def self.included( base ) | |
base.send :extend, ClassMethods | |
base.send :include, InstanceMethods | |
end | |
module ClassMethods | |
def metodo_de_clase | |
puts 'Método de clase' | |
end |
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
!!! 5 | |
%html | |
%head | |
%title Example HAML | |
/[if IE] | |
%link{ :rel => "stylesheet", :href => "/css/ie.css" } | |
%body | |
#container | |
%header | |
%h1 Our Awesome HTML5 Template |
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
cd /tmp | |
git clone git://git.kernel.org/pub/scm/git/git.git | |
cd git | |
git checkout v`git --version | awk '{print $3}'` | |
cp contrib/completion/git-completion.bash ~/.git-completion.bash | |
cd ~ | |
rm -rf /tmp/git | |
echo -e "source ~/.git-completion.bash" >> .profile |
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
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteRule ^$ web/ [L] | |
RewriteRule (.*) web/$1 [L] | |
</IfModule> |
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 | |
# encoding: utf-8 | |
require 'io/console' | |
require 'debugger' | |
require 'pygments' | |
def winsize | |
$stdout.winsize | |
end |
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
http://www.google.com | |
--------------------- | |
TITLE: Google | |
LANG: es | |
DESCRIPTION: Google.es permite acceder a la información mundial en castellano, catalán, gallego, euskara e inglés. | |
KEYWORDS: |
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
class Genre | |
MALE = 'man' | |
FEMALE = 'woman' | |
def self.count | |
2 | |
end | |
end | |
class Actor |
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
const TemplateSelector = ({ templates }) => { | |
return ( | |
<div> | |
<SearchBar /> | |
<Category /> | |
<TemplateList templates={templates} /> | |
</div> | |
); | |
}; |
OlderNewer