Skip to content

Instantly share code, notes, and snippets.

View augustohp's full-sized avatar

Augusto Pascutti augustohp

View GitHub Profile
@denji
denji / README.md
Last active June 7, 2025 06:35 — forked from Cubixmeister/README.md
Simple Sentry docker-compose.yml
  1. Download docker-compose.yml to dir named sentry
  2. Change SENTRY_SECRET_KEY to random 32 char string
  3. Run docker-compose up -d
  4. Run docker-compose exec sentry sentry upgrade to setup database and create admin user
  5. (Optional) Run docker-compose exec sentry pip install sentry-slack if you want slack plugin, it can be done later
  6. Run docker-compose restart sentry
  7. Sentry is now running on public port 9000
@augustohp
augustohp / github-pandoc.css
Last active December 15, 2017 06:41 — forked from dashed/github-pandoc.css
A GitHub-like CSS for Markdown files rendered in HTML with pandoc.
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 8/9.
*/
@augustohp
augustohp / code2rtf
Last active March 8, 2016 04:28
Wrapper to `highlight` tool, with sensible defaults and ease to use on directories
#!/usr/bin/env bash
#
# vim: et ts=4 sw=4 ft=sh:
declare -r SCRIPT_NAME=$0
declare -r THEME_LIGHT="Seashell"
declare -r THEME_DARK="Zenburn"
declare -r TAB_SPACES=4
declare -r LINE_NUMBER_COLUMN_LENGTH=4
declare -r OUTPUT_ENCODING=UTF-8
anonymous
anonymous / mapgen.js.coffee
Created February 15, 2015 19:32
Core algorithm for procedural city generation article (http://www.tmwhere.com)
# author: tmwhere.com
# --- third party dependencies
PIXI = require('pixi.dev')
_ = require('lodash')
noise = require('perlin').noise
Quadtree = require('quadtree').Quadtree
seedrandom = require('seedrandom')
# ---
@nelsonsar
nelsonsar / PosixErrorCodes.php
Created February 11, 2015 01:59
Posix error codes as class of constants. From here: http://fxr.watson.org/fxr/source/sys/errno.h
<?php
class PosixErrorCode
{
const EPERM = 1; /* Operation not permitted */
const ENOENT = 2; /* No such file or directory */
const ESRCH = 3; /* No such process */
const EINTR = 4; /* Interrupted system call */
const EIO = 5; /* Input/output error */
const ENXIO = 6; /* Device not configured */
@nelsonsar
nelsonsar / gototest.vim
Created October 26, 2014 02:40
Abrir o arquivo de teste do arquivo aberto em PHP
function GoToTest(...)
let filename = expand('%:t:r')
let test_filename = filename."Test.php"
"You can use a folder to avoid tabf to open the wrong file
if a:0 > 0
execute "tabf **/".a:1."/".test_filename
else
execute "tabf **/".test_filename
endif
endfunction
@alganet
alganet / 00-index.sh
Last active September 28, 2019 21:25
POSIX Shell HTTP/CGI application. Run as ./00-index.sh in ksh, dash, bash or zsh
# Main file, loads dependencies and holds application code
# Usage:
# $ git clone https://gist.github.com/a22a1373dcee7c175d1e.git
# $ cd a22a1373dcee7c175d1e
# $ chmod +x 00-index.sh
# $ ./00-index.sh
#
# Use sudo if your machine denies an address to netcat
#
@augustohp
augustohp / vim-para-usuarios-git.md
Last active March 20, 2024 20:09
Post: VIM para usuários Git

VIM para usuários Git

A intenção desse post é melhorar, se possível, seu workflow com o [Git][] se ele atualmente ele consiste de:

  1. Usar o [Git][] através de uma shell de sua escolha.
  2. Usar o [VIM][] como [editor padrão][2] [no Git][1].

Se você usa alguma ferramenta gráfica (tig também conta), eu não quero saber. Se você usa o [Git][] numa shell em conjunto com outro editor, procuro ansiosamente seu comentário me convencendo a trocar. :)

Preparando o VIm

@alganet
alganet / scrito
Last active August 29, 2015 13:57
Prototype for Mosai Script Tools 1.0. Works on sh, bash, ksh, zsh, and cmd on Windows and Wine! No dependencies.
#!/usr/bin/env sh
scrito () ( : )
# Static version information
scrito_v () ( scrito_version )
scrito_version () ( echo "Mosai Script Tools 1.0" 1>&2 )
# Short help text
scrito_h () ( scrito_help )
@alganet
alganet / index.php
Created December 12, 2013 03:24
Smallest HATEOAS sample in the world [citation needed]. Work in Progress!
<?php
use Respect\Rest\Router;
$r3 = new Router();
$routes = [];
$routes['singleAuthor'] = $r3->any('/authors/*', 'MySingleAuthorClass');
$routes['singlePost'] = $r3->any('/posts/*', 'MySinglePostClass');
$routes['postsList'] = $r3->any('/posts', 'MyPostsListClass');