Skip to content

Instantly share code, notes, and snippets.

View HugoLnx's full-sized avatar

HugoLnx HugoLnx

View GitHub Profile
#require 'typhoeus'
require 'rest-client'
require 'open-uri'
EXTENSIONS = %w[xml rss atom]
SUFFIXES = %w[/ /feed /rss /atom /feed/rss /feed/atom /news /blog /news/feed /blog/feed]
PREFIXES = %w[/feed /rss /atom]
URLS = %w[
https://www.gamesradar.com/edge
https://www.gamesradar.com/uk/edge/
@HugoLnx
HugoLnx / gcom_talk_vim.md
Created December 18, 2017 18:28
Getting Started with Vim: Setup & Learning Tips (Summary)

Getting Started with Vim: Setup & Learning Tips

Resumo da talk

Modes

  • navigation mode
  • insert mode
  • select mode (plain, line, block)

Files

  • quit (:q :q!)
# You've got to the beginning of the document !!!
# Use G to get to the end of the document
###########
## vimrc ##
###########
git clone git@github.com:HugoLnx/vimrc.git
cd vimrc
cat use.sh
@HugoLnx
HugoLnx / docker-compose.yml
Created June 22, 2017 20:49
Sample of docker compose yml with only one id, secret and no slaves
web:
command: sh -c "rails s --bind 0.0.0.0"
ports:
- "3000:3000"
build: .
volumes:
- .:/app
links:
- redis:redis.local
- mongodb:mongo.local
@HugoLnx
HugoLnx / condominios-perto.html
Created January 11, 2017 01:55
Lista de condominios perto da gcom
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
</head>
<body>
<ol>
<li>
@HugoLnx
HugoLnx / classroom-groups-configuring-prototype.html
Created October 11, 2016 13:09
Prototype of classroom groups configuring
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<style>
body {
padding: 10px;
}
ul, li {
require 'mysql2'
def open_connection
Mysql2::Client.new(host: 'localhost', username: 'root', database: 'repeatable_read_test')
end
class ThreadLogger
def initialize(id)
@id = id
end
@HugoLnx
HugoLnx / dabblet.css
Created January 31, 2013 15:17 — forked from anonymous/dabblet.css
Untitled
body{
width: 940px;
font-family: Century Gothic;
margin: 0 auto;
}
header{
border-bottom: 2px solid;
}
@HugoLnx
HugoLnx / dabblet.css
Created January 30, 2013 11:52
Não é para mexer no CSS acima
body {width: 200px;margin: 0 auto;}
#red {background:red;width:100px;height:100px;}
#green{background:green;width: 110px;height: 110px;}
#blue{background: blue;width: 120px;height:120px;}
#yellow{background:yellow;width:20px;height:20px;}
/* Não é para mexer no CSS acima */
/* Escrevam o CSS do Quadro AQUI! */
@HugoLnx
HugoLnx / gradiente.html
Created January 10, 2013 12:19
Algoritmo que recebe 2 cores hexadecimais e que desenha o gradiente entre as duas usando canvas do HTML5.
<html>
<body>
<fieldset>
<input id="cor1" type="color" />
<input id="cor2" type="color" />
<button id="btn">Gradiente!</button>
</fieldset>
<canvas id="canvas"></canvas>
<script>
var in1 = document.getElementById("cor1");