Skip to content

Instantly share code, notes, and snippets.

View phouverneyuff's full-sized avatar

Paulo Henrique phouverneyuff

  • Sao Paulo, SP
View GitHub Profile
@nimone
nimone / Sidebar.jsx
Created June 29, 2023 09:33
Retractable Sidebar Component purely in ReactJS and TailwindCSS
import { MoreVertical, ChevronLast, ChevronFirst } from "lucide-react"
import { useContext, createContext, useState } from "react"
const SidebarContext = createContext()
export default function Sidebar({ children }) {
const [expanded, setExpanded] = useState(true)
return (
<aside className="h-screen">
#!/bin/bash
time for ((i=1;i<=300;i++)); do \
curl --silent -X POST \
--happy-eyeballs-timeout-ms \
-d'{"numero_conta": 1, "cpf": "12000", "valor_saldo": 1000000000.0, "nome_titular": "Zé pilintra"}' \
-H "Content-Type: application/json" \
http://localhost:8080/exemplo/contacorrente > /dev/null 2>&1 ; \
done
@Ryanb58
Ryanb58 / install.md
Last active July 20, 2025 17:49
How to install telnet into a alpine docker container. This is useful when using the celery remote debugger in a dev environment.
>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found

/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
@evertonfraga
evertonfraga / ethdev.md
Last active August 25, 2017 22:41
Ambiente de desenvolvimento Ethereum

Ambiente de desenvolvimento para Ethereum

Este mini-guia compreende as ferramentas necessárias para executar contratos com o Mist e desenvolver Dapps utilizando uma rede local privada.

INSTALAÇÃO

  1. Instalar Mist
@rccursach
rccursach / Gemfile
Last active October 4, 2023 13:08 — forked from daqing/Gemfile
redis_pubsub_demo.rb
source "https://rubygems.org"
gem 'eventmachine'
gem 'sinatra'
gem 'yajl-ruby', require: 'yajl'
gem 'thin'
gem 'em-websocket'
@phouverneyuff
phouverneyuff / gist-upload
Last active May 4, 2019 16:29
gist-upload
#!/bin/bash
# Upload a file informed to gist.github.com. Before use, install gist 'gem install gist' - https://github.com/defunkt/gist and login with gist --login
if [ -z $1 ]; then
echo "File not informed. E.G: 'gist-upload file1.txt'"
exit 0
fi
FILE=$1
BASENAME=$(basename -- $1)
@DarrenN
DarrenN / get-npm-package-version
Last active June 20, 2025 19:20 — forked from yvele/get-npm-package-version.sh
Extract version from package.json (NPM) using bash / shell
# Version key/value should be on his own line
PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g')
echo $PACKAGE_VERSION
@capaj
capaj / module_parent_bar.js
Last active March 11, 2025 17:23
showcase of module.parent
var myFunc = require("./myFunc");
(function bar(){
myFunc("bar message");
})();
@jeffjohnson9046
jeffjohnson9046 / percent-filter.js
Last active September 4, 2020 23:25
Format percentages in AngularJS
// In app.js or main.js or whatever:
// var myApp = angular.module('askchisne', ['ngSanitize', 'ngAnimate', 'ui.bootstrap', 'ui.bootstrap.tpls']);
// This filter makes the assumption that the input will be in decimal form (i.e. 17% is 0.17).
myApp.filter('percentage', ['$filter', function ($filter) {
return function (input, decimals) {
return $filter('number')(input * 100, decimals) + '%';
};
}]);