Discover gists
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
/* Hola mundo */ | |
#include <stdio.h> | |
int main(int argc, char *argv[]) { | |
printf("Hola mundo\n"); | |
return 0; | |
} |
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
vive en una pina debajo del mar! | |
BOB ES PON JA! |
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
require 'thor' | |
module Gazette | |
class Application < Thor | |
desc "init", "Creates a new git managed blog in the current working directory" | |
def init | |
Application::Init.run | |
end # init | |
desc "post", "Post a new blog article" |
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
require 'thor' | |
module Gazette | |
class Application < Thor | |
desc "init", "Creates a new git managed blog in the current working directory" | |
def init | |
Application::Init.run | |
end # init | |
desc "post", "Post a new blog article" |
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
require 'thor' | |
module Gazette | |
class Application < Thor | |
desc "init", "Creates a new git managed blog in the current working directory" | |
def init | |
Application::Init.run | |
end # init | |
desc "post", "Post a new blog article" |
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
<?php | |
class Foo | |
{ | |
protected $user = null; | |
public function __construct($user) | |
{ | |
$this->user = $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
class GemHelper # :nodoc: | |
include Singleton | |
attr_accessor :project | |
attr_accessor :package | |
attr_accessor :gem_name | |
attr_accessor :version | |
def initialize | |
self.project = "magrathea" |
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
foreach($post_params as $key => $value) { | |
$sanitized_value = sanitize($value); | |
$regex = '/\<\$' . $key . '\>/'; | |
$template_content = preg_replace($regex, $sanitized_value, $template_content); | |
} | |
// lol |
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
# first we will give Domains a little help | |
class Domain < String | |
def subdomain( rank = 1 ) ; self.split('.')[0..(rank-1)].join('.') ; end | |
def level( rank ) ; self.split('.')[(rank*-1)..-1].join('.') ; end | |
def top_level ; level(1) ; end | |
end | |
# now we can treat them like strings but also access domain components naturally |
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
# first we will give Domains a little help | |
class Domain < String | |
def subdomain( rank = 1 ) ; self.split('.')[0..(rank-1)].join('.') ; end | |
def level( rank ) ; self.split('.')[(rank*-1)..-1].join('.') ; end | |
def top_level ; level(1) ; end | |
end | |
# now we can treat them like strings but also access domain components naturally |