Skip to content

Instantly share code, notes, and snippets.

View petronetto's full-sized avatar
🤖
What's up human?

Juliano Petronetto petronetto

🤖
What's up human?
View GitHub Profile
@bashbunni
bashbunni / .zshrc
Created January 4, 2023 16:28
CLI Pomodoro for Linux
# study stream aliases
# Requires https://github.com/caarlos0/timer to be installed. spd-say should ship with your distro
declare -A pomo_options
pomo_options["work"]="45"
pomo_options["break"]="10"
pomodoro () {
if [ -n "$1" -a -n "${pomo_options["$1"]}" ]; then
val=$1
@davidteren
davidteren / nerd_fonts.md
Last active May 24, 2024 08:16
Install Nerd Fonts via Homebrew [updated & fixed]
@bpolaszek
bpolaszek / bootstrap.php
Last active December 19, 2023 19:49
Symfony shortcuts for Pest
<?php
# tests/bootstrap.php
declare(strict_types=1);
namespace App\Test;
use ApiPlatform\Core\Bridge\Symfony\Bundle\Test\Client;
use App\Entity\User;
use App\Kernel;
@miguelgrinberg
miguelgrinberg / .vimrc
Last active April 4, 2024 19:06
My .vimrc configuration for working in Python with vim
" plugins
let need_to_install_plugins = 0
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
let need_to_install_plugins = 1
endif
call plug#begin()
Plug 'tpope/vim-sensible'
@jvrmaia
jvrmaia / finance.md
Last active September 17, 2023 21:56
finance

patrimômio mínimo de sobrevivência (PMS)

PMS = 6 x [gastos mensais]

patrimônio mínimo recomendado para sua segurança (PMR)

PMR = 12 x [gastos mensais] caso sua empregabilidade seja alta 20 x [gastos mensais] caso sua empregabilidade seja baixa

patrimônio ideal para sua idade e situação de consumo (PI)

@tonysneed
tonysneed / Mac OS X: Open in Visual Studio Code
Last active March 27, 2024 10:02
Add a command to Finder services in Mac OSX to open a folder in VS Code
- Open Automator
- File -> New -> Service
- Change "Service Receives" to "files or folders" in "Finder"
- Add a "Run Shell Script" action
- Change "Pass input" to "as arguments"
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*"
- Save it as something like "Open in Visual Studio Code"
@luchillo17
luchillo17 / index.md
Last active September 10, 2020 15:03
Showing how to make and use an Ionic 2 busy indicator with FortAwesome refresh spinner icon

#Busy indicator backup solution:

This gist show how to make a replacement for the Ionic 1 Busy indicator into Ionic 2 until the ionic staff creates the native one, relate to:

  1. Code pen ilustrating the ionic 1 version: http://codepen.io/chabelly/pen/xGdqbJ#0
  2. Ionic 1 docs about that component: http://ionicframework.com/docs/api/service/$ionicLoading/
  3. Video that shows how it looks in an ionic 2 deploy ready app, last 4 sec (hint, it is the one with spinning arrows): Ionic 2 loading replacement

##Pre-requisits

@hollodotme
hollodotme / Install-php7.md
Last active August 11, 2022 06:23
Installing php7-fpm with phpredis and xdebug extension on Ubuntu 14.04

Install php7.0-fpm

# remove php5 modules
apt-get autoremove --purge php5-*
# add php-7.0 source list by [Ondřej Surý](https://github.com/oerdnj)
add-apt-repository ppa:ondrej/php
# Update index
apt-get update
# Install php7.0-fpm with needed extensions
@jsor
jsor / ddd_cqrs_event-sourcing_in_php.md
Last active April 23, 2024 19:48
DDD, CQRS and Event Sourcing in PHP

DDD, CQRS and Event Sourcing in PHP

  • Broadway - Infrastructure and testing helpers for creating CQRS and event sourced applications
  • EventCentric.Core - Event Sourcing and CQRS in PHP
  • LiteCQRS - Small convention based CQRS library for PHP
  • predaddy - Common DDD classes including an annotation driven message bus and tools for CQRS and Event Sourcing
  • ProophEventSourcing - Provides basic functionality for event-sourced aggregates
  • ProophEventStore - PHP 5.4+ EventStore Implementation
  • ProophServiceBus - PHP Enterprise Service Bus Implementation supporting CQRS and DDD
@shimofuri
shimofuri / imap_monitor
Created December 20, 2012 22:04
Python script for monitoring an IMAP folder
Each existing unread and subsequent new emails after the script is started are
passed as Mail objects to "process_email" function.Function header is provided
but processing implementation is left to the user. Error logs are currently sent
to a rotating log file (in the same directory as the script) and to STDOUT.
Instead of polling or checking the server for new emails every now and then,
IMAP IDLE check is utilized. Ensure that the IMAP server supports IDLE command
and allows at least 5 minutes of idling*** and uses the default ports for this
script to work. Tested to work with Gmail and default installations of MS
Exchange Server.