├── .Xresources ├── .atom ├── .gitignore ├── config.cson └── style.less ├── .gitattributes ├── .gitignore ├── .gitk ├── .hgrc ├── .htoprc ├── .pip ├── .gitignore └── pip.conf ├── .pypirc_sample ├── .screenrc ├── .toprc ├── .vimrc ├── .xprofile ├── LICENSE ├── README.md ├── bin ├── backup │ ├── config.py │ ├── cronjob.py │ ├── efetua_backup.py │ └── restaura_backup.py ├── cargo-list ├── check-htpasswd.sh ├── clone-it-ebooks.info.sh ├── colors.py ├── evaporate.sh ├── extract_derpconf.py ├── extract_iniconf.py ├── extract_json.py ├── extract_yaml.py ├── filter_blank_lines.sh ├── get_dict_keys.py ├── git │ ├── git-branch-name │ ├── git-checkout-merge-request │ ├── git-checkout-pull-request │ ├── git-copy-ref │ ├── git-copy-ref-full │ ├── git-filter-branch.sh │ ├── git-ref │ ├── git-remote-shift │ ├── git-rm-deleted │ ├── git-show-commits │ ├── git-tag-remote │ ├── git-tags │ └── git-untracked ├── github_import_issues.rb ├── holman │ ├── LICENSE.md │ ├── cloudapp │ ├── dot │ ├── e │ ├── git-all │ ├── git-amend │ ├── git-copy-branch-name │ ├── git-credit │ ├── git-delete-local-merged │ ├── git-nuke │ ├── git-promote │ ├── git-rank-contributors │ ├── git-track │ ├── git-undo │ ├── git-unpushed │ ├── git-unpushed-stat │ ├── git-up │ ├── git-wtf │ ├── gitio │ ├── headers │ ├── movieme │ ├── mustacheme │ ├── res │ ├── search │ ├── set-defaults │ └── todo ├── holmes_api_domain_delete.sh ├── holmes_api_domain_search.sh ├── i3wm │ ├── i3-cycle-focus.py │ ├── i3exit.sh │ └── toggletouchpad.sh ├── imgcat ├── imgls ├── iso-8859-1-to-utf-8.sh ├── it-ebooks-downloader.py ├── len.py ├── memusg ├── onetab-to-bookmarks.py ├── onetab-to-markdown.py ├── pdf2png ├── realpath.py ├── rtomayko │ ├── +x │ ├── 1posix │ ├── README.md │ ├── ack │ ├── addr │ ├── argv │ ├── autoscreen │ ├── bitch, │ ├── cfcurl │ ├── colordump │ ├── ctags-ruby │ ├── diffprefix │ ├── diffstrip │ ├── gendiff │ ├── git-amend │ ├── git-big-object-report │ ├── git-conflicts │ ├── git-cut-branch │ ├── git-find-object │ ├── git-grab │ ├── git-ignore │ ├── git-incoming │ ├── git-ls-object-refs │ ├── git-object-deflate │ ├── git-outgoing │ ├── git-prune-merged-branches │ ├── git-pruneall │ ├── git-rel │ ├── git-reup │ ├── git-sh │ ├── git-thanks │ ├── git-track │ ├── git-up │ ├── github-open │ ├── github-pull-request │ ├── github-url │ ├── gxpr │ ├── gzball │ ├── headers │ ├── hide │ ├── keepalive-time │ ├── latest-ack │ ├── latest-hub │ ├── lgrep │ ├── license │ ├── lock-screen │ ├── lsrb │ ├── man.cx │ ├── markdown │ ├── markdown-footnote │ ├── markdown-open │ ├── memcache-top │ ├── memcached-tool │ ├── orig │ ├── p │ ├── pb_curl │ ├── pbindent │ ├── pbsed │ ├── pidkill │ ├── ports │ ├── ppeek │ ├── prune-dirs │ ├── rbconfig │ ├── rbdev │ ├── served │ ├── shipit │ ├── smarty │ ├── sshenv │ ├── sync-home │ ├── textile-open │ ├── tfratstiehoiml │ ├── trunc │ ├── ts │ ├── unwrap │ └── webseq ├── set-tab-title.sh ├── signalconv.py ├── smtpcheck.py ├── strip_tags.php ├── subl_menu_visible.sh ├── toml2json ├── trim └── urldecode.py ├── brew-cask-list.txt ├── brew-list.txt ├── fish ├── .gitignore ├── completions │ ├── coverage.fish │ ├── fuck.fish │ ├── nosetests.fish │ ├── passpie.fish │ ├── tsuru-admin.fish │ └── tsuru.fish ├── conf.d │ ├── aliases.fish │ ├── etc.fish │ ├── git.fish │ ├── omf.fish │ └── rustsrc.fish ├── config.fish ├── functions │ ├── __bass.py │ ├── bass.fish │ ├── bump-master.fish │ ├── decrypt-tar-gunzip.fish │ ├── fish_user_key_bindings.fish │ ├── link-by-uuid.fish │ ├── lss.fish │ ├── md2pdf.fish │ ├── mdview.fish │ ├── new-project.fish │ ├── pipeset.fish │ ├── python-line-profile.fish │ ├── retrieve-website.fish │ ├── reverse.fish │ ├── rm-untracked.fish │ ├── set-abbreviations.fish │ ├── slugify.fish │ ├── sort-by-last-field.fish │ ├── tar-gzip-encrypt.fish │ └── watch.fish └── iterm2-startup.fish ├── git-hooks ├── hook-chain.sh ├── post-update-deploy-ks ├── pre-commit-flake8 ├── pre-commit-forbidden-words └── pre-push-do-not-push-me-on-master ├── git ├── config ├── groups.inc └── ignore ├── hammerspoon ├── Modules │ └── caffeine.lua ├── Spoons │ └── MicMute.spoon │ │ ├── docs.json │ │ └── init.lua └── init.lua ├── i3wm ├── i3 │ └── config └── i3status │ ├── config │ └── i3status.sh ├── iTerm2 ├── Atom.itermcolors ├── Brogrammer.itermcolors ├── Darkside.itermcolors ├── Glacier.itermcolors ├── Monokai Soda.itermcolors ├── One Dark.itermcolors ├── Panic.itermcolors ├── Solarized Dark.itermcolors ├── Solarized Light.itermcolors ├── Tomorrow Night Eighties.itermcolors ├── Tomorrow Night.itermcolors └── com.googlecode.iterm2.plist ├── kitty ├── kitty.conf └── mina_paster.py ├── logo.png ├── logo.svg ├── omf ├── .gitignore ├── bundle ├── init.fish ├── revision └── theme ├── ruff └── pyproject.toml ├── stuff └── freenode-channels.txt ├── terminator └── config ├── tmux.conf ├── vscode ├── User │ ├── .gitignore │ ├── keybindings.json │ ├── settings.json │ └── snippets │ │ └── python.json ├── extensions │ └── list.txt └── styles │ ├── README.md │ └── workbench.main.css └── zed └── settings.json /.Xresources: -------------------------------------------------------------------------------- 1 | urxvt.scrollBar: off 2 | urxvt.font: xft:jetbrainsmono-thin:size=8:autohint=true:antialias=true 3 | urxvt.saveLines: 20000 4 | 5 | URxvt.iso14755: false 6 | URxvt.iso14755_52: false 7 | URxvt.perl-ext-common: "default, -searchable-scrollback" 8 | 9 | URxvt.depth: 32 10 | URxvt.background: rgba:0000/0000/0000/a000 11 | 12 | URxvt.keysym.C-Up: string:\033[1;5A 13 | URxvt.keysym.C-Down: string:\033[1;5B 14 | URxvt.keysym.C-Left: string:\033[1;5D 15 | URxvt.keysym.C-Right: string:\033[1;5C 16 | URxvt.keysym.C-S-Up: string:\033[1;6A 17 | URxvt.keysym.C-S-Down: string:\033[1;6B 18 | URxvt.keysym.C-S-Left: string:\033[1;6D 19 | URxvt.keysym.C-S-Right: string:\033[1;6C 20 | 21 | !! https://web.archive.org/web/20090912095618/http://phraktured.net/terminal-colors/terminal%20theme.tags.html 22 | 23 | !!Theme One 24 | !*background: rgb:00/00/00 25 | !*foreground: rgb:a8/a8/a8 26 | !*color0: rgb:00/00/00 27 | !*color1: rgb:a8/00/00 28 | !*color2: rgb:00/a8/00 29 | !*color3: rgb:a8/54/00 30 | !*color4: rgb:00/00/a8 31 | !*color5: rgb:a8/00/a8 32 | !*color6: rgb:00/a8/a8 33 | !*color7: rgb:a8/a8/a8 34 | !*color8: rgb:54/50/54 35 | !*color9: rgb:f8/54/50 36 | !*color10: rgb:50/fc/50 37 | !*color11: rgb:f8/fc/50 38 | !*color12: rgb:50/54/f8 39 | !*color13: rgb:f8/54/f8 40 | !*color14: rgb:50/fc/f8 41 | !*color15: rgb:f8/fc/f8 42 | 43 | !Theme Three 44 | !*background: rgb:00/00/00 45 | *foreground: rgb:cf/cf/cf 46 | !*color0: rgb:00/00/00 47 | *color1: rgb:e0/10/10 48 | *color2: rgb:20/ad/20 49 | *color3: rgb:d4/c2/4f 50 | *color4: rgb:23/1b/b8 51 | *color5: rgb:9c/38/85 52 | *color6: rgb:1d/bd/b8 53 | *color7: rgb:fe/fe/fe 54 | *color8: rgb:6a/6a/6a 55 | *color9: rgb:e8/3a/3d 56 | *color10: rgb:35/e9/56 57 | *color11: rgb:ff/ff/2f 58 | *color12: rgb:3a/53/f0 59 | *color13: rgb:e6/28/ba 60 | *color14: rgb:1c/f5/f5 61 | *color15: rgb:ff/ff/ff 62 | -------------------------------------------------------------------------------- /.atom/.gitignore: -------------------------------------------------------------------------------- 1 | .apm 2 | compile-cache 3 | .node-gyp 4 | nohup.out 5 | packages 6 | projects.cson 7 | storage 8 | -------------------------------------------------------------------------------- /.atom/config.cson: -------------------------------------------------------------------------------- 1 | "*": 2 | "exception-reporting": 3 | userId: "d24ef4b7-6a7d-3309-812a-0a167cfde57c" 4 | welcome: 5 | showOnStartup: false 6 | metrics: false 7 | editor: 8 | invisibles: {} 9 | showInvisibles: true 10 | tabLength: 4 11 | scrollSensitivity: 60 12 | showIndentGuide: true 13 | fontSize: 12 14 | core: 15 | autoHideMenuBar: true 16 | ignoredNames: [ 17 | "*.pyc" 18 | "*.*~" 19 | ] 20 | themes: [ 21 | "seti-ui" 22 | "seti-syntax" 23 | ] 24 | disabledPackages: [ 25 | "highlight-line" 26 | ] 27 | "linter-flake8": 28 | ignoreErrorCodes: [ 29 | "E501" 30 | ] 31 | linter: {} 32 | -------------------------------------------------------------------------------- /.atom/style.less: -------------------------------------------------------------------------------- 1 | .tree-view { 2 | font-size: 11px; 3 | } 4 | 5 | atom-text-editor::shadow { 6 | 7 | .git-commit.line-too-long.deprecated { 8 | color: orange; 9 | text-decoration: none; 10 | } 11 | 12 | .git-commit.line-too-long.illegal { 13 | color: #fff; 14 | background: #DA2C43; 15 | opacity: 0.9; 16 | } 17 | 18 | .invalid.illegal { 19 | color: #fff; 20 | background: #DA2C43; 21 | opacity: 0.9; 22 | } 23 | 24 | .markup.underline.link.hyperlink { 25 | color: #F9EE98; 26 | text-decoration: underline; 27 | } 28 | 29 | .gfm { 30 | .markup { 31 | &.heading { 32 | color: #87C38A; 33 | font-weight: bold; 34 | } 35 | 36 | &.underline { 37 | color: #F9EE98; 38 | text-decoration: underline; 39 | } 40 | } 41 | 42 | .bold { 43 | font-weight: bold; 44 | } 45 | 46 | .italic { 47 | font-style: italic; 48 | } 49 | 50 | .raw { 51 | color: #C6C5FE; 52 | } 53 | 54 | &.source { 55 | color: #DDD; 56 | } 57 | 58 | .variable.list { 59 | color: #96CBFE; 60 | font-weight: bold; 61 | } 62 | 63 | .link { 64 | color: #CCC; 65 | 66 | .entity { 67 | color: #DDD; 68 | font-weight: bold; 69 | } 70 | } 71 | 72 | .emoji { 73 | .word { 74 | color: #FF73FD; 75 | } 76 | .start { 77 | font-weight: bold; 78 | color: #777; 79 | } 80 | .end { 81 | font-weight: bold; 82 | color: #777; 83 | } 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | bin/rtomayko/** linguist-vendored 2 | bin/holman/** linguist-vendored 3 | bin/fast-export/** linguist-vendored 4 | holman-dotfiles-master/** linguist-vendored 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | sublime-text-3-packages-user/GoSublime/osx-x64/log.txt 2 | .pypirc 3 | vscode/User/History 4 | -------------------------------------------------------------------------------- /.gitk: -------------------------------------------------------------------------------- 1 | set mainfont {Verdana 11} 2 | set textfont {Inconsolata 14} 3 | set uifont {{Inconsolata} 13 bold} 4 | set tabstop 8 5 | set findmergefiles 0 6 | set maxgraphpct 50 7 | set maxwidth 16 8 | set cmitmode patch 9 | set wrapcomment none 10 | set autoselect 1 11 | set autosellen 40 12 | set showneartags 1 13 | set maxrefs 20 14 | set hideremotes 0 15 | set showlocalchanges 1 16 | set datetimeformat {%Y-%m-%d %H:%M:%S} 17 | set limitdiffs 1 18 | set uicolor grey85 19 | set want_ttk 1 20 | set bgcolor white 21 | set fgcolor black 22 | set uifgcolor black 23 | set uifgdisabledcolor #999 24 | set colors {green red blue magenta darkgrey brown orange} 25 | set diffcolors {red "#00a000" blue} 26 | set mergecolors {red blue green purple brown "#009090" magenta "#808000" "#009000" "#ff0080" cyan "#b07070" "#70b0f0" "#70f0b0" "#f0b070" "#ff70b0"} 27 | set markbgcolor #e0e0ff 28 | set diffcontext 3 29 | set selectbgcolor gray85 30 | set foundbgcolor yellow 31 | set currentsearchhitbgcolor orange 32 | set extdifftool meld 33 | set perfile_attrs 0 34 | set headbgcolor green 35 | set headfgcolor black 36 | set headoutlinecolor black 37 | set remotebgcolor #ffddaa 38 | set tagbgcolor yellow 39 | set tagfgcolor black 40 | set tagoutlinecolor black 41 | set reflinecolor black 42 | set filesepbgcolor #aaaaaa 43 | set filesepfgcolor black 44 | set linehoverbgcolor #ffff80 45 | set linehoverfgcolor black 46 | set linehoveroutlinecolor black 47 | set mainheadcirclecolor yellow 48 | set workingfilescirclecolor red 49 | set indexcirclecolor green 50 | set circlecolors {white blue gray blue blue} 51 | set linkfgcolor blue 52 | set circleoutlinecolor black 53 | set geometry(main) 1280x752+0+22 54 | set geometry(state) zoomed 55 | set geometry(topwidth) 1280 56 | set geometry(topheight) 283 57 | set geometry(pwsash0) "877 1" 58 | set geometry(pwsash1) "1046 1" 59 | set geometry(botwidth) 1063 60 | set geometry(botheight) 464 61 | set permviews {} 62 | -------------------------------------------------------------------------------- /.hgrc: -------------------------------------------------------------------------------- 1 | # Mercurial configuration file 2 | # http://www.selenic.com/mercurial/hgrc.5.html 3 | 4 | # http://www.selenic.com/mercurial/hgrc.5.html#ui 5 | [ui] 6 | username = Pablo Santiago Blum de Aguiar 7 | editor = vim 8 | merge = meld 9 | 10 | # http://mercurial.selenic.com/wiki/UsingExtensions 11 | [extensions] 12 | color= 13 | graphlog= 14 | histedit= 15 | pager= 16 | progress= 17 | rebase= 18 | record= 19 | transplant= 20 | hggit = /Users/pablo/Workspace/hg-git/hggit 21 | 22 | # http://mercurial.selenic.com/wiki/PagerExtension 23 | [pager] 24 | pager = LESS='FRX' less -d 25 | quite = True 26 | attend = annotate, cat, diff, export, qlog, log, qdiff 27 | 28 | # http://www.selenic.com/mercurial/hgrc.5.html#diff 29 | [diff] 30 | git = 1 31 | showfunc = 1 32 | unified = 8 33 | 34 | # http://www.selenic.com/mercurial/hgrc.5.html#defaults 35 | [defaults] 36 | commit = -v 37 | qnew = -Ue 38 | log = -G 39 | -------------------------------------------------------------------------------- /.htoprc: -------------------------------------------------------------------------------- 1 | # Beware! This file is rewritten every time htop exits. 2 | # The parser is also very primitive, and not human-friendly. 3 | # (I know, it's in the todo list). 4 | fields=0 48 17 18 38 39 40 2 46 47 49 1 5 | sort_key=46 6 | sort_direction=1 7 | hide_threads=0 8 | hide_kernel_threads=1 9 | hide_userland_threads=0 10 | shadow_other_users=0 11 | highlight_base_name=0 12 | highlight_megabytes=1 13 | highlight_threads=0 14 | tree_view=1 15 | header_margin=1 16 | detailed_cpu_time=0 17 | color_scheme=0 18 | delay=15 19 | left_meters=AllCPUs Memory Swap 20 | left_meter_modes=1 1 1 21 | right_meters=Tasks LoadAverage Uptime 22 | right_meter_modes=2 2 2 23 | -------------------------------------------------------------------------------- /.pip/.gitignore: -------------------------------------------------------------------------------- 1 | pip.log 2 | -------------------------------------------------------------------------------- /.pip/pip.conf: -------------------------------------------------------------------------------- 1 | [list] 2 | format=columns 3 | -------------------------------------------------------------------------------- /.pypirc_sample: -------------------------------------------------------------------------------- 1 | [distutils] 2 | index-servers = 3 | pypi 4 | testpypi 5 | 6 | [pypi] 7 | username = __token__ 8 | password = ********* 9 | 10 | [testpypi] 11 | username = __token__ 12 | password = ********* 13 | -------------------------------------------------------------------------------- /.toprc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scorphus/scorphiles/7cf4623acbe9c235b59a1d990448671f583423f8/.toprc -------------------------------------------------------------------------------- /.vimrc: -------------------------------------------------------------------------------- 1 | set nocompatible 2 | 3 | runtime! debian.vim 4 | 5 | if has("syntax") 6 | syntax on 7 | endif 8 | 9 | set background=dark 10 | 11 | if has("autocmd") 12 | au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif 13 | endif 14 | 15 | set mouse=a " Enable mouse usage (all modes) 16 | 17 | if filereadable("/etc/vim/vimrc.local") 18 | source /etc/vim/vimrc.local 19 | endif 20 | 21 | colorscheme desert 22 | filetype plugin indent on 23 | filetype indent on 24 | set t_Co=256 25 | set number 26 | set laststatus=2 27 | set nohlsearch 28 | set incsearch 29 | set ignorecase 30 | set ruler 31 | set autoindent 32 | set tabstop=4 33 | set softtabstop=4 34 | set shiftwidth=4 35 | set shiftround 36 | set expandtab 37 | set smarttab 38 | set nowrap 39 | -------------------------------------------------------------------------------- /.xprofile: -------------------------------------------------------------------------------- 1 | ~/.fehbg & 2 | xcompmgr & 3 | thunar --daemon & 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | -------------------------------------------------------------------------------- /bin/backup/config.py: -------------------------------------------------------------------------------- 1 | # -*- coding: UTF-8 -*- 2 | 'Arquivo com diretivas de configuração para scripts de backup e restauração' 3 | 4 | __author__ = 'Pablo Santiago Blum de Aguiar ' 5 | __copyright__ = 'Copyright (c) 2008 Blum-Aguiar' 6 | __license__ = '''Copyright (c) 2008 Blum-Aguiar 7 | Copyright (c) 2008 Pablo Santiago Blum de Aguiar 8 | All rights reserved. 9 | 10 | Redistribution and use in source and binary forms, with or without modification, 11 | are permitted provided that the following conditions are met: 12 | 13 | * Redistributions of source code must retain the above copyright notice, 14 | this list of conditions and the following disclaimer. 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | * Neither the name of the Blum-Aguiar nor the names of its contributors may be 19 | used to endorse or promote products derived from this software without 20 | specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 23 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 24 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 25 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 26 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 27 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 29 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 31 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.''' 32 | 33 | # Configurações da conexão com o banco de dados 34 | DBConfig = { 35 | 'host': 'localhost', 36 | 'user': 'root', 37 | 'pass': '', 38 | 'charset': 'utf8' 39 | } 40 | -------------------------------------------------------------------------------- /bin/backup/efetua_backup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: UTF-8 -*- 3 | '''Uso: %s 4 | Exemplo: para efetuar um backup da base de dados xpto 5 | no arquivo xpto.sql.bz2 execute: 6 | Exemplo: %s xpto xpto.sql.bz2''' 7 | 8 | __author__ = 'Pablo Santiago Blum de Aguiar ' 9 | __copyright__ = 'Copyright (c) 2008 Blum-Aguiar' 10 | __license__ = '''Copyright (c) 2008 Blum-Aguiar 11 | Copyright (c) 2008 Pablo Santiago Blum de Aguiar 12 | All rights reserved. 13 | 14 | Redistribution and use in source and binary forms, with or without modification, 15 | are permitted provided that the following conditions are met: 16 | 17 | * Redistributions of source code must retain the above copyright notice, 18 | this list of conditions and the following disclaimer. 19 | * Redistributions in binary form must reproduce the above copyright notice, 20 | this list of conditions and the following disclaimer in the documentation 21 | and/or other materials provided with the distribution. 22 | * Neither the name of the PBA IT Solutions nor the names of its contributors 23 | may be used to endorse or promote products derived from this software 24 | without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 27 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 29 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 30 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 32 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 33 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 35 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.''' 36 | 37 | import sys 38 | import commands 39 | 40 | from config import DBConfig 41 | 42 | def dumpDatabase(database, outfile): 43 | 'Efetua o dump de database em outfile' 44 | if DBConfig['user'] != '': 45 | adminUser = '-u %s' % DBConfig['user'] 46 | else: 47 | adminUser = '-u root' 48 | if DBConfig['pass'] != '': 49 | adminPass = '-p%s' % DBConfig['pass'] 50 | else: 51 | adminPass = '' 52 | mysqlDump = 'mysqldump %s %s' % (adminUser, adminPass) 53 | basename = outfile.split('.') 54 | basename.reverse() 55 | if len(basename) > 0 and basename[0] == 'sql': 56 | cmd = '%s --opt %s > %s' % (mysqlDump, database, outfile) 57 | elif len(basename) > 1 and basename[1] == 'sql': 58 | if basename[0] == 'gz': 59 | cmd = '%s %s | gzip > %s' % (mysqlDump, database, outfile) 60 | elif basename[0] == 'bz2': 61 | cmd = '%s %s | bzip2 -c > %s' % (mysqlDump, database, outfile) 62 | else: 63 | print 'Tipo de arquivo não confere com os suportados (.sql, .sql.gz, .sql.bz2)' 64 | sys.exit(1) 65 | else: 66 | print 'Tipo de arquivo não confere com os suportados (.sql, .sql.gz, .sql.bz2)' 67 | sys.exit(1) 68 | res = commands.getstatusoutput(cmd) 69 | if res[0] == 0: 70 | print 'Arquivo %s gerado com sucesso!' % outfile 71 | else: 72 | print 'Erro ao gerar arquivo %s: %s' % (outfile, res[1]) 73 | 74 | def uso(): 75 | 'Mostra como se usa o programa' 76 | print __doc__ % (sys.argv[0], sys.argv[0]) 77 | 78 | def main(): 79 | 'Função principal' 80 | try: 81 | databaseName = sys.argv[1] # nome da base de dados 82 | outfile = sys.argv[2] # arquivo de saida 83 | except IndexError: 84 | print 'Número de argumentos inválido!' 85 | uso() 86 | sys.exit(1) 87 | dumpDatabase(databaseName, outfile) 88 | 89 | if __name__ == "__main__": 90 | main() 91 | -------------------------------------------------------------------------------- /bin/backup/restaura_backup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: UTF-8 -*- 3 | '''Uso: %s 4 | Exemplo: para restaurar um backup feito no arquivo xpto.sql.bz2 5 | na base de dados xpto_restore execute: 6 | %s xpto.sql.bz2 xpto_restore''' 7 | 8 | __author__ = 'Pablo Santiago Blum de Aguiar ' 9 | __copyright__ = 'Copyright (c) 2008 Blum-Aguiar' 10 | __license__ = '''Copyright (c) 2008 Blum-Aguiar 11 | Copyright (c) 2008 Pablo Santiago Blum de Aguiar 12 | All rights reserved. 13 | 14 | Redistribution and use in source and binary forms, with or without modification, 15 | are permitted provided that the following conditions are met: 16 | 17 | * Redistributions of source code must retain the above copyright notice, 18 | this list of conditions and the following disclaimer. 19 | * Redistributions in binary form must reproduce the above copyright notice, 20 | this list of conditions and the following disclaimer in the documentation 21 | and/or other materials provided with the distribution. 22 | * Neither the name of the PBA IT Solutions nor the names of its contributors 23 | may be used to endorse or promote products derived from this software 24 | without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 27 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 29 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 30 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 32 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 33 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 35 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.''' 36 | 37 | import sys 38 | import commands 39 | 40 | from config import DBConfig 41 | 42 | def restoreDatabase(infile, database): 43 | 'Efetua o restore de infile em database' 44 | if DBConfig['pass'] != '': 45 | adminUser = '-u %s' % DBConfig['user'] 46 | else: 47 | adminUser = '-u root' 48 | if DBConfig['pass'] != '': 49 | adminPass = '-p%s' % DBConfig['pass'] 50 | else: 51 | adminPass = '' 52 | mysqlDump = 'mysql %s %s' % (adminUser, adminPass) 53 | basename = infile.split('.') 54 | basename.reverse() 55 | if len(basename) > 0 and basename[0] == 'sql': 56 | cmd = '%s %s < %s' % (mysqlDump, database, infile) 57 | elif len(basename) > 1 and basename[1] == 'sql': 58 | if basename[0] == 'gz': 59 | cmd = 'gunzip < %s | %s %s' % (infile, mysqlDump, database) 60 | elif basename[0] == 'bz2': 61 | cmd = 'bunzip2 < %s | %s %s' % (infile, mysqlDump, database) 62 | else: 63 | print 'Tipo de arquivo não confere com os suportados (.sql, .sql.gz, .sql.bz2)' 64 | sys.exit(1) 65 | else: 66 | print 'Tipo de arquivo não confere com os suportados (.sql, .sql.gz, .sql.bz2)' 67 | sys.exit(1) 68 | res = commands.getstatusoutput(cmd) 69 | if res[0] == 0: 70 | print 'Backup restaurado do arquivo %s com sucesso!' % infile 71 | else: 72 | print 'Erro ao restaurar backup do arquivo %s: %s' % (infile, res[1]) 73 | 74 | def uso(): 75 | 'Mostra como se usa o programa' 76 | print __doc__ % (sys.argv[0], sys.argv[0]) 77 | 78 | def main(): 79 | 'Função principal' 80 | try: 81 | infile = sys.argv[1] # arquivo de entrada 82 | databaseName = sys.argv[2] # nome da base de dados 83 | except IndexError: 84 | print 'Número de argumentos inválido!' 85 | uso() 86 | sys.exit(1) 87 | restoreDatabase(infile, databaseName) 88 | 89 | if __name__ == "__main__": 90 | main() 91 | -------------------------------------------------------------------------------- /bin/cargo-list: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding:utf-8 -*- 3 | 4 | # Copyright 2016 Pablo Santiago Blum de Aguiar . All rights 5 | # reserved. Use of this source code is governed by Apache License, Version 2.0, 6 | # that can be found on https://opensource.org/licenses/Apache-2.0 7 | 8 | import sys 9 | 10 | from operator import itemgetter 11 | from subprocess import check_output 12 | 13 | try: 14 | import ujson as json 15 | except: 16 | import json 17 | 18 | 19 | def main(argv): 20 | metadata = json.loads(check_output(['cargo', 'metadata'])) 21 | 22 | for package in sorted(metadata.get('packages', []), key=itemgetter('name')): 23 | print('{name} ({version})'.format(**package)) 24 | 25 | return 0 26 | 27 | 28 | if __name__ == '__main__': 29 | status = main(sys.argv) 30 | sys.exit(status) 31 | -------------------------------------------------------------------------------- /bin/check-htpasswd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # https://httpd.apache.org/docs/2.2/misc/password_encryptions.html 3 | 4 | HTPASSWD=$1 5 | USERNAME=$2 6 | PASSWORD=$3 7 | 8 | ENTRY=`cat $HTPASSWD | grep "^$USERNAME:"` 9 | HASH=`echo $ENTRY | cut -f 2 -d :` 10 | SALT=`echo $HASH | cut -f 3 -d $` 11 | RESULT=`openssl passwd -apr1 -salt $SALT $PASSWORD` 12 | 13 | echo "File: $HTPASSWD" 14 | echo "Username: $USERNAME" 15 | echo "Entry: $ENTRY" 16 | echo "Hash: $HASH" 17 | echo "Salt: $SALT" 18 | 19 | echo "password to check: $PASSWORD" 20 | echo "openssl result: $RESULT" 21 | 22 | if [ $RESULT = $HASH ] 23 | then 24 | echo "OKAY" 25 | else 26 | echo "NOT MATCHED" 27 | fi 28 | -------------------------------------------------------------------------------- /bin/clone-it-ebooks.info.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | mkdir dump html images pdf 3 | for (( i=$1;i<=$2;i++ ));do 4 | lynx -source http://it-ebooks.info/book/$i >site.html 5 | lynx -dump site.html >site.txt 6 | LINK_PDF=`grep 'Download:' site.html | awk -F"'" '{print $2}'` 7 | LINK_IMG=`grep 'src="/images/ebooks/' site.html |awk -F\= '{print $2}'|awk -F\" '{print$2}'` 8 | PUBLISHER=`grep 'Publisher:' site.txt | awk -F']' '{print $2}' | sed -e 's/[^[:alnum:]]/_/g' | tr -s '_'` 9 | NOME=`grep "QR code" site.txt | sed "s/ QR code - //g" | sed -e 's/[^[:alnum:]]/_/g' | tr -s '_'` 10 | mv site.html html/"${NOME}.html" 11 | mv site.txt dump/"${NOME}_${i}.html" 12 | if [ "$NOME" != "" ];then 13 | echo "Baixando $i - $NOME.pdf" 14 | cd images 15 | wget -c http://www.it-ebooks.info/${LINK_IMG} 16 | cd .. 17 | mkdir "pdf/${PUBLISHER}" 18 | wget -c $LINK_PDF --referer=http://it-ebooks.info/book/$i -O "pdf/${PUBLISHER}/${NOME}_${i}.pdf" 19 | fi 20 | done 21 | -------------------------------------------------------------------------------- /bin/colors.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | from __future__ import print_function 3 | 4 | def PrintTableHeader(fg): 5 | for num, name in fg: 6 | print("%-7s " % name, end="") 7 | 8 | def Clear(): 9 | print("%c[39;49m " % 27, end="") 10 | 11 | def PrintRowLabel(index, bg): 12 | print("%9s " % bg[index][1], end="") 13 | 14 | def PrintCell(fi, bi, fg, bg): 15 | print("%c[%d;%dm%-9s " % (27, bg[bi][0], fg[fi][0], u"Abc\u2605".encode('utf-8')), end="") 16 | 17 | def PrintMargin(): 18 | print(" ", end="") 19 | 20 | dfg = [(30, "black"), 21 | (31, "red"), 22 | (32, "green"), 23 | (33, "yellow"), 24 | (34, "blue"), 25 | (35, "magenta"), 26 | (36, "cyan"), 27 | (37, "white")] 28 | 29 | lfg = [(90, "black"), 30 | (91, "red"), 31 | (92, "green"), 32 | (93, "yellow"), 33 | (94, "blue"), 34 | (95, "magenta"), 35 | (96, "cyan"), 36 | (97, "white") ] 37 | 38 | dbg = [(40, "black"), 39 | (41, "red"), 40 | (42, "green"), 41 | (43, "yellow"), 42 | (44, "blue"), 43 | (45, "magenta"), 44 | (46, "cyan"), 45 | (47, "white") ] 46 | 47 | lbg = [(100, "black"), 48 | (101, "red"), 49 | (102, "green"), 50 | (103, "yellow"), 51 | (104, "blue"), 52 | (105, "magenta"), 53 | (106, "cyan"), 54 | (107, "white") ] 55 | 56 | titles = [ "Dark on Dark", "Light on Dark", "Dark on Light", "Light on Light" ] 57 | t = 0 58 | print() 59 | for bg in (dbg, lbg): 60 | print("%9s %c[1m" % ("", 27), end="") 61 | for fg in (dfg, lfg): 62 | print("%25s%-40s" % ("", titles[t]), end="") 63 | PrintMargin() 64 | print(" ", end="") 65 | t += 1 66 | print("%9s %c[0m" % ("", 27), end="") 67 | 68 | print() 69 | print("%9s " % "", end="") 70 | for fg in (dfg, lfg): 71 | PrintTableHeader(fg) 72 | PrintMargin() 73 | print(" ", end="") 74 | print() 75 | 76 | for y in xrange(8): 77 | PrintRowLabel(y, bg) 78 | 79 | for fg in (dfg, lfg): 80 | for x in xrange(8): 81 | PrintCell(x, y, fg, bg) 82 | Clear() 83 | PrintMargin() 84 | 85 | print("") 86 | print("") 87 | print() 88 | 89 | -------------------------------------------------------------------------------- /bin/evaporate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | days=10 4 | path=$HOME/Volatile 5 | 6 | test -d $path || exit 1 7 | 8 | echo Removing old files: 9 | find $path -type f -mtime +$days -print -delete 10 | 11 | echo Removing empty directories: 12 | find $path -type d -empty -print -delete 13 | -------------------------------------------------------------------------------- /bin/extract_derpconf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding:utf-8 -*- 3 | 4 | # Copyright 2015 Pablo Santiago Blum de Aguiar . All rights 5 | # reserved. Use of this source code is governed by Apache License, Version 2.0, 6 | # that can be found on https://opensource.org/licenses/Apache-2.0 7 | 8 | import sys 9 | 10 | if __name__ == '__main__': 11 | conf_vars = {} 12 | with open(sys.argv[1]) as conf_file: 13 | for line in conf_file.readlines(): 14 | if '=' in line: 15 | try: 16 | exec(line, {}, conf_vars) 17 | except: 18 | pass 19 | try: 20 | print conf_vars[sys.argv[2]] 21 | except: 22 | print 'Available variables:\n {}'.format( 23 | '\n '.join(sorted(conf_vars.keys())) 24 | ) 25 | print 'Usage: extract_derpconf.py ' 26 | -------------------------------------------------------------------------------- /bin/extract_iniconf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding:utf-8 -*- 3 | 4 | # Copyright 2015 Pablo Santiago Blum de Aguiar . All rights 5 | # reserved. Use of this source code is governed by Apache License, Version 2.0, 6 | # that can be found on https://opensource.org/licenses/Apache-2.0 7 | 8 | import ConfigParser 9 | import os 10 | import sys 11 | 12 | 13 | def main(argv): 14 | '''Usage: extract_iniconf.py {} {}