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 / 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 / surfing_keys_config.js
Last active August 7, 2023 17:04
SurfingKeys Configuration
const {
aceVimMap,
mapkey,
imap,
imapkey,
getClickableElements,
vmapkey,
map,
unmap,
cmap,
<?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 / 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

@pedro-stanaka
pedro-stanaka / vimVixen.config.json
Created April 17, 2018 13:08
vimVixen.config.json
{
"keymaps": {
"0": { "type": "scroll.home" },
":": { "type": "command.show" },
"o": { "type": "command.show.open", "alter": false },
"O": { "type": "command.show.open", "alter": true },
"t": { "type": "command.show.tabopen", "alter": false },
"T": { "type": "command.show.tabopen", "alter": true },
"w": { "type": "command.show.winopen", "alter": false },
"W": { "type": "command.show.winopen", "alter": true },
@pedro-stanaka
pedro-stanaka / date_formatting.php
Created March 26, 2018 15:20
Date Formatting with Intl
<?php
$fmt = datefmt_create(
'en_US',
IntlDateFormatter::FULL,
IntlDateFormatter::FULL,
'UTC',
IntlDateFormatter::GREGORIAN,
"y-MM-dd'T'H:mm:ssX"
);
<?php
if (!isset(static::$_formatters[$key])) {
if ($timezone === '+00:00' || $timezone === 'Z') {
$timezone = 'UTC';
} elseif ($timezone[0] === '+' || $timezone[0] === '-') {
$timezone = 'GMT' . $timezone;
}
static::$_formatters[$key] = datefmt_create(
$locale,
$dateFormat,
@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 / 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