Skip to content

Instantly share code, notes, and snippets.

View chrismuiruriz's full-sized avatar

Chris Muiruri chrismuiruriz

View GitHub Profile
@beechnut
beechnut / README.md
Created August 23, 2022 14:58
I forgot the password to my local SonarQube instance and now I'm locked out

Reset SonarQube admin password

Did you forget the admin password for your local Dockerized instance of SonarQube? Do you have a lot of scans done that you need for a vendor evaluation?

We've all been there. (Well, all of us who found this Gist maybe.)

If you're using Docker, go to your Docker dashboard and run an interactive terminal session. This will open a terminal window with a command like this:

docker exec -it {Container ID} /bin/sh
@Cathon
Cathon / InfowindowDemo
Created February 24, 2016 13:37
Google map Js API infowindow array
var map;
var infowindow;
var locations = [
{lat: 52.511, lng: 13.447},
{lat: 52.549, lng: 13.422},
{lat: 52.497, lng: 13.396},
{lat: 52.517, lng: 13.394}
];
var contents = [
"aaa",
@maarten00
maarten00 / pmt.js
Created March 19, 2015 09:56
Excel PMT in PHP and JavaScript
/**
* Copy of Excel's PMT function.
* Credit: http://stackoverflow.com/questions/2094967/excel-pmt-function-in-js
*
* @param rate_per_period The interest rate for the loan.
* @param number_of_payments The total number of payments for the loan in months.
* @param present_value The present value, or the total amount that a series of future payments is worth now;
* Also known as the principal.
* @param future_value The future value, or a cash balance you want to attain after the last payment is made.
* If fv is omitted, it is assumed to be 0 (zero), that is, the future value of a loan is 0.
@Mikodes
Mikodes / gist:be9b9ce42e46c3d4ccb6
Created November 26, 2014 10:30
All Media queries for resolutions
/* (320x480) iPhone (Original, 3G, 3GS) */
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
/* insert styles here */
}
/* (320x480) Smartphone, Portrait */
@media only screen and (device-width: 320px) and (orientation: portrait) {
/* insert styles here */
}
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],