Skip to content

Instantly share code, notes, and snippets.

View pmatheusvinhas's full-sized avatar
🎯
Hi

Paulo M. Vinhas @ pmv pmatheusvinhas

🎯
Hi
View GitHub Profile
@ishad0w
ishad0w / sources.list
Created April 30, 2020 16:55
Ubuntu 20.04 LTS (Focal Fossa) -- Full sources.list
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
@gboudreau
gboudreau / profile-tabs-for-um-fix-for-latest-um.diff
Created September 5, 2019 11:13
Diff to fix Ultimate Member Profile Tabs (profile-tabs-for-ultimate-member) for Ultimate Member 2.0.53 and later
diff -rbc a/profile-tabs-for-ultimate-member/core.php b/profile-tabs-for-ultimate-member/core.php
*** a/profile-tabs-for-ultimate-member/core.php 2018-09-29 16:05:06.000000000 -0400
--- b/profile-tabs-for-ultimate-member/core.php 2019-08-30 00:00:02.000000000 -0400
***************
*** 7,13 ****
add_action( 'init', array( $this, 'create_cpt' ) );
add_action( 'admin_menu', array( $this, 'add_admin_page' ) );
add_action( 'template_redirect', array( $this, 'show_profile_tab_content' ), 20 );
! add_filter( 'um_profile_tabs', array( $this, 'add_profile_tabs' ), 9000 );
}
@antoniopresto
antoniopresto / banco_codigo.json
Last active June 13, 2025 12:51
JSON bancos do brasil com código
[
{
"value": "001",
"label": "Banco do Brasil S.A."
},
{
"value": "003",
"label": "Banco da Amazônia S.A."
},
{
@mikelehen
mikelehen / generate-pushid.js
Created February 11, 2015 17:34
JavaScript code for generating Firebase Push IDs
/**
* Fancy ID generator that creates 20-character string identifiers with the following properties:
*
* 1. They're based on timestamp so that they sort *after* any existing ids.
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs.
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly).
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the
* latter ones will sort after the former ones. We do this by using the previous random bits
* but "incrementing" them by 1 (only in the case of a timestamp collision).
*/