Skip to content

Instantly share code, notes, and snippets.

View PadCesar's full-sized avatar

César Papilloud PadCesar

View GitHub Profile
@PadCesar
PadCesar / cmd.sh
Created January 14, 2020 11:49
[sqlite3 DB grafana]Reset grafana password into admin,admin
root@codesposts:~# sqlite3 /var/lib/grafana/grafana.db
SQLite version 3.28.0 2019-07-04 01:12:19
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .tables
alert dashboard_version quota
alert_notification data_source session
annotation login_attempt star
annotation_tag migration_log tag
@PadCesar
PadCesar / gist:e0cf0d96e7b9c32f83064031cd206da0
Created January 14, 2020 10:38 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@PadCesar
PadCesar / User Repos GitApi
Created November 29, 2019 10:12 — forked from Sorroko/User Repos GitApi
Dirty damn code for getting all the commits for all user repos
function GitStream() {
var sort_asc = function (commit1, commit2) {
if (commit1.date < commit2.date) return 1;
if (commit1.date > commit2.date) return -1;
return 0;
};
var commits = [];
var toDo = 0;
var done = 0;
@PadCesar
PadCesar / HashMap.js
Last active December 14, 2018 09:35 — forked from dtx/HashMap.js
A simple HashMap implementation in Javascript, just something I wrote while reading DailyJS.
var HashMap = function(){
this._size = 0;
this._map = {};
}
HashMap.prototype = {
put: function(key, value){
if(!this.containsKey(key)){
this._size++;
JLinkExe -device nrf51822 -if swd -speed 4000
JLinkEXE -device nrf51822 -if swd -speed 4000