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 "github_api" | |
user = '' | |
token = '' | |
github = Github.new oauth_token: token | |
coderwall_orgs = [] | |
github.orgs.list.each do |org| | |
coderwall_orgs << org.login if org.login =~ /^coderwall/ |
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
$('.modal') | |
.on('shown', function(){ | |
$('body').css({overflow: 'hidden'}); | |
}) | |
.on('hidden', function(){ | |
$('body').css({overflow: ''}); | |
}); |
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
# This file should be placed on the directory of ~/blog/config | |
upstream unicorn { | |
server unix:/tmp/unicorn.todo.socket fail_timeout=0; | |
} | |
server { | |
listen 80 default; | |
#server_name example.com; | |
root /home/username/blog/public; |
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 'securerandom' | |
require 'em-http-request' | |
require 'pry-nav' | |
require 'json' | |
require 'faye/websocket' | |
require 'eventmachine' | |
require 'rest_client' | |
class WTV | |
def initialize(my_id, my_token) |
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
wehfoiwehfwef |
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
namespace :db do | |
namespace :enable do | |
desc "enable hstore extension" | |
task :hstore => [:environment, :load_config] do | |
ActiveRecord::Base.connection.execute('CREATE EXTENSION IF NOT EXISTS hstore;') | |
end | |
end | |
Rake::Task['db:schema:load'].enhance ['db:enable:hstore'] | |
end |
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 primos(limite): | |
primos = [] | |
for elemento in range(2,limite): | |
encontrado = False | |
for primo in primos: | |
if elemento % primo == 0 and elemento is not primo: | |
encontrado = True | |
break | |
if not encontrado: | |
primos.append(elemento) |
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
Basic commands: | |
html:5 | |
Creates a HTML5 template |
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
This zen: | |
html:5>h1+(fieldset>(p>label+input)*2)+(fieldset>(label+(p>input)*4)+(p>label+input)*2)+(fieldset>(p>label+input)*4+(label+select>option*2)) | |
Generates this: | |
<!DOCTYPE HTML> | |
<html lang="en-US"> |
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
public class Operaciones { | |
/** | |
* @param args | |
*/ | |
public static void main(String[] args) { | |
char operacion = args[0].charAt(0); | |
int valor = Integer.parseInt(args[1]); | |
suma(valor, operacion); | |
} |
OlderNewer