Skip to content

Instantly share code, notes, and snippets.

View mauricionr's full-sized avatar
🏠
Working remotely

Mauricio mauricionr

🏠
Working remotely
View GitHub Profile
@mauricionr
mauricionr / git_remember_password.md
Created May 29, 2019 11:47 — forked from ankurk91/git_remember_password.md
Git credential cache, why type password again and again

Git tip: Tired of entering password again and again ?

Run this command to remember your password:

git config --global credential.helper 'cache --timeout 28800'

Above command will tell git to cache your password for 8 hours.

@mauricionr
mauricionr / install.sh
Created January 11, 2018 13:02 — forked from ziadoz/install.sh
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`
@mauricionr
mauricionr / clone_redis.py
Created September 14, 2017 16:07 — forked from jimmyislive/clone_redis.py
Redis Elasticache Export
from optparse import OptionParser
import sys
import redis
__author__ = 'Jimmy John'
__doc__ = '''
This is a script to make a copy of a redis db. Mainly to be used for cloning AWS Elasticache
instancces. Elasticache seems to disable the SAVE/BGSAVE commands and you do not have access to
the physical redis instances. The UI allows you to create 'Snapshots', but no way to download
/**
* Generates a client ID in the format historically used by the Google Analytics
* JavaScript libraries. Note that any alphanumeric value may be used, but
* ideally each should be unique to a given client.
*
* More information on Client IDs:
* https://developers.google.com/analytics/devguides/collection/protocol/v1/email#client-id-cid
*/
function generateGaClientId() {
Adyen Test Card Numbers
These cards are only valid on our TEST system and they will never involve any actual transaction or transfer of funds. The TEST card numbers will not work on the Adyen LIVE Platform.
For all cards use the following expiration and CVV2/CVC2/or CID for Amex.
For all cards:
Expiration Dates CVV2 / CVC3 CID (American Express)
08/2018 OR 10/2020 737 7373
@mauricionr
mauricionr / nginx.conf.default
Created February 28, 2017 14:17 — forked from nishantmodak/nginx.conf.default
Default Nginx Conf
#user nobody;
#Defines which Linux system user will own and run the Nginx server
worker_processes 1;
#Referes to single threaded process. Generally set to be equal to the number of CPUs or cores.
#error_log logs/error.log; #error_log logs/error.log notice;
#Specifies the file where server logs.
# install openjdk
sudo apt-get install openjdk-7-jdk
# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools
# install all sdk packages
@mauricionr
mauricionr / rulething.html
Created September 17, 2016 15:41 — forked from mpj/rulething.html
Code from episode
<html>
<head>
<style>
.row div {
height: 8px;
display: inline-block;
width: 8px;
}
.row div.active {
background-color: red;
const fetch = require('node-fetch')
const Bacon = require('baconjs')
function getInPortuguese(word) {
// Google Translate API is a paid (but dirt cheap) service. This is my key
// and will be disabled by the time the video is out. To generate your own,
// go here: https://cloud.google.com/translate/v2/getting_started
const apiKey =
'AIzaSyB4DyRHIsNhogQXmH16YKbZfR-lTXrQpq0'
const url =
@mauricionr
mauricionr / get-sharepoint-access-token.py
Last active September 16, 2015 20:47 — forked from demelziraptor/get-sharepoint-access-token.py
Code example to get a Sharepoint Access Token to use with the Sharepoint REST API using a python 3 provider-hosted Sharepoint App (using cherrypy). This code takes the data POSTed to it when you click on the app in Sharepoint, and authenticates using OAuth to get the access token. To use the Sharepoint REST API with OAuth, the app needs to be re…
import cherrypy
import jwt
import urllib.parse, urllib.request
import json
SPSECRET = 'gpYucHkODHOv6JxZJ89Kihl9ncTiTrUCAbOaF1N6uJE='
cherrypy.config.update({'server.socket_port': 3005,
'server.ssl_module': 'builtin',
'server.ssl_certificate': 'cert.pem',