Skip to content

Instantly share code, notes, and snippets.

View Drowze's full-sized avatar

R Gibim Drowze

View GitHub Profile
@Drowze
Drowze / gist:76a9b85372d168c8e013
Last active March 9, 2016 19:12
Podcasts I follow
--------- BRASILEIROS
Jogabilidade (games)
-> Esse feed abriga os podcasts sobre vídeo games do Jogabilidade. O DASH é temático e foca-se num jogo, série, desenvolvedor ou conceito a cada episódio. O Vértice é um compilado das mais recentes notícias e jogos que experimentamos. O Construindo Mundos entrevista e explora o lado humano dos desenvolvedores de games brasileiros.
http://feeds.feedburner.com/dashpodcast
Jogabilidade (não games)
-> Esse é o feed para os podcasts do Jogabilidade que não falam de vídeo games. O JACK é um podcast que discute anime e mangás num formato de "clube do livro". O Linha Quente é onde despejamos nossa (pouca) sabedoria sobre as mais diversas questões. No Fora da Caixa, recomendamos e discutimos todo o resto, de música a seriados, de filmes a canais de YouTube.
http://feeds.feedburner.com/jack-animeclub
{
"color_scheme": "Packages/Theme - Flatland/Flatland Monokai.tmTheme",
"font_size": 13,
"highlight_line": true,
"match_brackets_angle": true,
"ignored_packages":
[
"Vintage"
],
"tab_size": 2,
@Drowze
Drowze / check_cpf.rb
Created November 3, 2016 18:23
simple method to check a cpf
def check_cpf(cpf=nil)
return false if cpf.nil?
known_invalid_cpfs = %w{12345678909 11111111111 22222222222 33333333333
44444444444 55555555555 66666666666 77777777777
88888888888 99999999999 00000000000 }
cpf_digits = cpf.scan /[0-9]/
if cpf_digits.length == 11
unless known_invalid_cpfs.include?(cpf_digits.join)
cpf_digits = cpf_digits.map{|x| x.to_i}
@Drowze
Drowze / minix_tutorial.md
Last active February 26, 2024 09:00
MINIX: FROM ZERO TO ZERO+1: Setting SSH, adding system calls and system libraries to custom system calls in Minix 3.3.0; based on a University assignment. #minix #c #system_call #custom_library #c_library #library

Disclaimer

I take no responsability for any problems a user might have on following this gist. This includes university problems.

The motivation for this is to document, as dummy-oriented as possible, a way to setup and add a system call to Minix OS. This is a classic assignment at Operational Systems classes (and is pretty cool tbh)

Configuration:

ISO used: minix_R3.3.0-588a35b.iso

@Drowze
Drowze / git.rake
Last active June 3, 2017 00:22
Rake task to create git tag with timestamp and all the merge events since last tag
namespace :git do
desc 'Create a tag with release name and merge events since last tag'
# expects merge events with no-ff, as gitlab does by default
APP_NAME = ''
MERGE_EVENTS_SINCE_LAST_TAG =
`git log \`git describe --tags --abbrev=0\`..HEAD --merges --oneline`
def release_name
@Drowze
Drowze / grafo.txt
Last active June 9, 2017 12:39 — forked from diogofurtado/Ordenação Topológica.c
Topological sort
1 0
2 0
3 0
4 3
5 4
6 5
7 5
8 7
9 8
10 9
@Drowze
Drowze / index.php
Last active June 6, 2017 04:34
woodbine gallery
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Ohana means family</title>
<!-- Bootstrap -->
For an app I'm building for myself, I have to provide a privacy policy for
data retrieved from the API.
I will not release any data from the Uber API without explicit and clear
consent of the user.
This does not affect the user's statutory rights. The user is able to stop
using the service at any time, and can remove any data from the service
using the appropriate database management commands.
@Drowze
Drowze / main.rb
Last active October 5, 2017 02:06
run with "ruby main.rb GAME_ID" and build a simple webpage with all the not-obtained steam achievements for a game, ordered from the most popular to the less popular
require 'ostruct'
require 'erb'
STEAM_PROFILE_ID = 'YOUR_STEAM_PROFILE_ID' # https://steamid.io/
STEAM_API_KEY = 'YOUR_API_KEY' # http://steamcommunity.com/dev/apikey (enter '127.0.0.1' if you're unsure about your domain name)
OUTPUT_HTML = 'steam_achievements.html'
INPUT_ERB = 'steam_achievements.html.erb'
module Steam
@Drowze
Drowze / wallhaven.rb
Last active March 22, 2020 11:43
Ruby script to scrap wallpapers from Wallhaven. Also provided a way to automatically use a downloaded wallpaper #wallhaven #ruby
require 'mechanize'
class WallHaven
BASE_URI = 'https://wallhaven.cc'
def initialize(limit: 24, human_download: false)
@agent = Mechanize.new
@limit = limit.to_i
@human_download = human_download
end