Skip to content

Instantly share code, notes, and snippets.

View mariomka's full-sized avatar

Mario Juárez mariomka

View GitHub Profile
@mariomka
mariomka / stripe-keys-and-ids.tsv
Created July 28, 2020 07:22 — forked from fnky/stripe-keys-and-ids.tsv
Stripe keys and IDs
Prefix Description Notes
sk_live_ Live secret key Secret key in a live environment.
pk_live_ Live public key Public key in a live environment.
pst_live_ Live Connection token Connection token in a live environment.
sk_test_ Test secret key Pecret key in a test environment.
pk_test_ Test public key Public key in a test environment.
pst_test_ Test Connection token Connection token in a test environment.
ac_ Platform Client ID Identifier for an auth code/client id.
acct_ Account ID Identifier for an Account object.
ch_ Charge ID Identifier for a Charge object.
@mariomka
mariomka / dump-mysql.md
Created March 16, 2020 09:31
Dump mysql using Docker
docker run -e PASSWORD=DATABASE_PASSWORD --rm -v `pwd`:/backup mysql sh -c 'exec mysqldump --column-statistics=0 --databases DATABASE_NAME --opt -h DATABASE_HOST -u DATABASE_USER -p"$PASS" > /backup/backup.sql'
@mariomka
mariomka / challenge.js
Last active July 22, 2017 15:26
Madrid Devs regex challenge. Node version.
const readline = require('readline')
const fs = require('fs')
const rl = readline.createInterface({
input: fs.createReadStream('muestra_log.txt')
})
const pattern = /(.*?) (.*?) (.*?) \[(.*?)\] "(.*?) (.*?) (.*?)" (\d+?|-) (\d+?|-) "(.*?)" (.*?) "(.*?)" "(.*?)" ([\d\.]+?|-) "(\d*?|-)" "(.*?)"/
let count = 0
rl.on('line', function (line) {
@mariomka
mariomka / challenge.php
Last active July 20, 2017 18:16
Madrid Devs regex challenge :O
<?php
// ini_set('memory_limit', '2G');
$handle = fopen('muestra_log.txt', 'r');
if (!$handle) {
die('Error loading file.');
}