Skip to content

Instantly share code, notes, and snippets.

View pedromaironi's full-sized avatar
Looking for Job

Pedro Toribio pedromaironi

Looking for Job
View GitHub Profile
@Klerith
Klerith / heroes.js
Created May 7, 2020 17:40
Un pequeño arreglo de héroes para hacer ejercicios
const heroes = [
{
id: 1,
name: 'Batman',
owner: 'DC'
},
{
id: 2,
name: 'Spiderman',
owner: 'Marvel'
@jordanmack
jordanmack / getGasPrice.py
Created June 3, 2018 21:00
A simple Python script to determine the Ethereum gas price that should be used by utilizing the EthGasStation.info API. I use this in simple automation scripts and find it to be more reliable for predicting a safe gas price during congested periods.
#!/usr/bin/env python3
import json
import math
import requests
DEFAULT = 15
MODIFIER = 2
try:
@maheshkelkar
maheshkelkar / jsonToMap.java
Created May 25, 2016 21:34
Simple example on how to convert Json string to Hash Map<String, Object>
//http://stackoverflow.com/questions/21720759/convert-a-json-string-to-a-hashmap
public static Map<String, Object> jsonToMap(JSONObject json) throws JSONException {
Map<String, Object> retMap = new HashMap<String, Object>();
if(json != JSONObject.NULL) {
retMap = toMap(json);
}
return retMap;
}
@gollum23
gollum23 / superlog
Created February 3, 2016 02:52
Superlog Curso git platzi
git config --global alias.superlog "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"
@yarcowang
yarcowang / docker-log.sh
Last active January 6, 2023 21:16
simple bash script to show log for a docker image
#!/usr/bin/env bash
DOCKER=`which docker`
usage()
{
echo "Usage: $(basename $0) [-l num] IMAGE"
exit 0
}
@johnpolacek
johnpolacek / .gitconfig
Last active July 9, 2024 12:14
My current .gitconfig aliases
[alias]
co = checkout
cob = checkout -b
coo = !git fetch && git checkout
br = branch
brd = branch -d
brD = branch -D
merged = branch --merged
st = status
aa = add -A .
@kimenye
kimenye / gist:eef321a2a182bd4544af
Created August 6, 2014 09:59
WhatsApp manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="48513" android:versionName="2.11.301" package="com.whatsapp">
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION">
</uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION">
</uses-permission>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE">
</uses-permission>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE">