Skip to content

Instantly share code, notes, and snippets.

View pedro-stanaka's full-sized avatar

Pedro Tanaka pedro-stanaka

View GitHub Profile
@pedro-stanaka
pedro-stanaka / surfing_keys_config.js
Last active August 7, 2023 17:04
SurfingKeys Configuration
const {
aceVimMap,
mapkey,
imap,
imapkey,
getClickableElements,
vmapkey,
map,
unmap,
cmap,
@pedro-stanaka
pedro-stanaka / 0_base_post_install.sh
Created November 28, 2017 19:03
Post Install Script for Manjaro
#!/bin/bash
################################
######### VARIABLES ############
################################
EMAIL="email@provider.com"
AUTHOR="Pedro Tanaka"
################################
# Update pacman and install keyring to avoid signature problems
@pedro-stanaka
pedro-stanaka / main.go
Last active January 28, 2022 08:33
Golang example of Prometheus usage
package main
import (
"context"
"fmt"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/collectors"
"github.com/prometheus/client_golang/prometheus/promauto"
"log"
"net/http"
@pedro-stanaka
pedro-stanaka / cVimrc.vim
Last active February 7, 2020 10:04
cVim - cVimrc
set autoupdategist
set noautofocus
set nocncpcompletion
set smoothscroll
set hud
set noregex
set noinsertmappings
set typelinkhints
set defaultnewtabpage
<?php
class ArgsMerger
{
/**
* @param mixed[] $args
* @param ReflectionMethod $reflectionMethod
*
* @return array
*/
--TEST--
Verifies that generated remote object will pass default parameters in method declaration to Adapter.
--FILE--
<?php
require_once __DIR__ . '/init.php';
use ProxyManager\Factory\RemoteObject\AdapterInterface;
interface FooServiceInterface
@pedro-stanaka
pedro-stanaka / 0_base_post_install.sh
Last active May 14, 2019 17:15
Very Opinionated Post Install Script Ubuntu 17.10
#!/bin/bash
####### DISCLAIMER: ###############################################################
# Use this script at your own risk, I DO NOT HOLD RESPONSABILITIES FOR DAMAGES! #
# READ EVERYTHING BEFORE RUNNING! YOU'VE BEEN WARNED! #
###################################################################################
## Config ##
@pedro-stanaka
pedro-stanaka / clean-install-linux.sh
Last active October 11, 2018 17:14
Install all things i need in a linux (debian-based)... 64 bits version
#!/bin/sh
# Upgrade packages that are available to update
sudo apt-get update
sudo apt-get -y upgrade
# Miscelaneous tools and media players and game emulators
sudo apt-get install -y build-essential ubuntu-restricted-extras htop vcl smplayer k3b audacity audacious audacious-plugins visualboyadvance pcsxr
@pedro-stanaka
pedro-stanaka / postgisToLatLngArray
Last active June 18, 2018 07:57
A fast way to transform a PostGIS polygon in WKT format to Javascript (Google Maps API)
/**
* Get an polygon postgis object casted to a string and transform to an instance of
* google.maps.polygon
* @author Pedro Tanaka <pedro.stanaka@gmail.com>
* @param {String} polygonStr String from the PostGis function TS_geometryToText(...)
* @returns {Array} An array with the LatLng's to be put in the polygon
*/
function postgisPolygonToJsonArray(polygonStr){
polygonStr = polygonStr.replace('POLYGON((', '');
@pedro-stanaka
pedro-stanaka / gitflow-breakdown.md
Created May 17, 2018 18:07 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository