Skip to content

Instantly share code, notes, and snippets.

View Drowze's full-sized avatar

R Gibim Drowze

View GitHub Profile
@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 -->
@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 / 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 / minix_tutorial.md
Last active October 21, 2024 20:51
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 / 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}
{
"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 / 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
@Drowze
Drowze / examinator.rb
Last active December 12, 2015 05:38
WIP: script to auto-correct almost any program (the outputs should not contain "\n\n" though)
## Converting line endings to unix:
inputs_file = File.open('./inputs.txt', 'a+')
outputs_file = File.open('./outputs.txt', 'a+')
input_file_contents = inputs_file.read.gsub(/\r\n?/,"\n")
inputs_file.truncate(0)
inputs_file.print input_file_contents
outputs_file_contents = outputs_file.read.gsub(/\r\n?/,"\n")
outputs_file.truncate(0)
Tempo (s) Pos (Y) V = at G (m/s^2) Variação Y
0 2500 0 -3.711
1 2498 -3.711 -3.711 -2
2 2493 -7.422 -3.711 -5
3 2483 -11.133 -3.711 -10
4 2470 -14.844 -3.711 -13
5 2454 -18.555 -3.711 -16
6 2433 -22.266 -3.711 -21
7 2409 -25.977 -3.711 -24
8 2381 -29.688 -3.711 -28
@Drowze
Drowze / mergesort.c
Last active December 4, 2015 05:11
#sort #sorting #puc apc-b 2016
#include <stdio.h>
void merge(int v[], int inicio, int meio, int fim) {
int aux[100];
int aux_inicio = inicio, aux_meio = meio + 1, k=0;
while(aux_inicio <= meio && aux_meio <= fim)
if(v[aux_inicio] <= v[aux_meio])
aux[k++] = v[aux_inicio++];
else
aux[k++] = v[aux_meio++];