Skip to content

Instantly share code, notes, and snippets.

View alexandre-mbm's full-sized avatar

Alexandre Magno alexandre-mbm

  • Natal (RN), Brazil
View GitHub Profile
@alexandre-mbm
alexandre-mbm / 2015-08-12.md
Last active August 29, 2015 14:27
Documentando jornada com GRUB em EFI ou GPT

Segue o procedimento mais correto para mexer com GRUB a partir de LiveCD:

Em resumo: usar chroot.

1) Reatribuir montagens do sistema

root@ubuntu:/home/alexandre# mount --bind /dev mnt/dev
root@ubuntu:/home/alexandre# mount --bind /sys mnt/sys
root@ubuntu:/home/alexandre# mount --bind /proc mnt/proc
@alexandre-mbm
alexandre-mbm / config.md
Last active August 29, 2015 14:25 — forked from gladson/config.md
Configuração Virtualenvs Webfaction
@alexandre-mbm
alexandre-mbm / fsplit.sh
Created June 25, 2015 02:00
Divide arquivo de texto em três partes e imprime os limites
#!/bin/bash
split -n l/3 content.txt
tr '\n' ' ' < xaa | sed -e "s/ */ /g" -e "s/\t//g" > xaa.0
tr '\n' ' ' < xab | sed -e "s/ */ /g" -e "s/\t//g" > xab.0
tr '\n' ' ' < xac | sed -e "s/ */ /g" -e "s/\t//g" > xac.0
mv xaa.0 xaa
mv xab.0 xab
require 'tmpdir'
# Usage:
# add to ruhoh-site/plugins/publish/github.rb
# - Your GitHub remote must be setup properly but The command will try to walk you through it.
# - You must have a clean working directory to publish to GitHub pages since the hook is actually triggered by commits.
#
# $ cd ruhoh-site
# $ bundle exec ruhoh publish github
class Ruhoh
@alexandre-mbm
alexandre-mbm / favicon.ico
Last active August 29, 2015 14:11 — forked from mikeymckay/friendly sqlite nosql sinatra
Example: Friendly + Sinatra
#!/usr/bin/env ruby
require 'json' # gem install json # also: activesupport (~> 2.3.18)
require 'rubygems' # gem install rubygems
require 'friendly' # gem install ihoka-friendly
Friendly.configure({
:adapter => "sqlite",
:database => "database.sqlite3"
})

locale_merge.rb

Dependencies:

sudo apt-get install ruby rails

Use:

curl -L http://git.io/locale_merge.rb | ruby - en.yml pt.yml > new-pt.yml
164615702, 210590664, 271442683, 251259574, 201516396, 32957008, 32955745, 284512041, 284512041, 130624786, 130624823, 130624831, 130624831, 32910694, 32910694, 130986197, 245693500, 156222846, 96427970, 201705085, 243432474, 165621137, 194801356, 194801356, 222389858, 222389917, 222389860, 243432476, 243432476, 243432476, 277411902, 33184363, 33184359, 186822029, 161699866, 161699866, 31557855, 97200737, 168518958, 168518958, 46699624, 46699624, 171851158, 171851158, 31557855, 137530989, 273193656, 273193655, 133321912, 192808286, 192808286, 51865853, 51865856, 51865856, 253699597, 253699597, 274979022, 274979022, 46270968, 46270968, 231951271, 97200739, 97200715, 97200754, 97200762, 97200724, 97200719, 171851108, 171851108, 31569635, 31569635, 129015047, 232164625, 129014547, 129014547, 129015047, 274979022, 272016770, 274979022, 241946630, 31587222, 249046110, 249046110, 249046114, 249046114, 273070439, 152480688, 152480688, 152480688, 152480688, 46175698, 46177108, 46177108, 216697072, 248410190, 21669707
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
--- 1.osm 2014-06-12 19:31:59.000000000 -0300
+++ 2.osm 2014-06-12 19:32:25.000000000 -0300
@@ -930,14 +930,14 @@
<tag k='name' v='Rua José Francisco de Figueiredo' />
<tag k='source:name' v='IBGE;extrapolation' />
</way>
- <way id='41306360' timestamp='2010-01-18T02:27:18Z' uid='71025' user='Bráulio Bezerra' visible='true' version='2' changeset='3647598'>
+ <way id='41306360' action='modify' timestamp='2010-01-18T02:27:18Z' uid='71025' user='Bráulio Bezerra' visible='true' version='2' changeset='3647598'>
<nd ref='616062029' />
<nd ref='616062026' />