Skip to content

Instantly share code, notes, and snippets.

View chrismuiruriz's full-sized avatar

Chris Muiruri chrismuiruriz

View GitHub Profile
@chrismuiruriz
chrismuiruriz / README.md
Created March 31, 2024 14:46 — forked from beechnut/README.md
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
@chrismuiruriz
chrismuiruriz / useRouterParams.ts
Created December 30, 2022 12:02 — forked from ramirezsandin/useRouterParams.ts
React hook to be used with Next.js, it uses useRouter internally and offers some helper functions to manipulate the url query params.
import { useRouter } from "next/router";
import { ParsedUrlQuery } from "querystring";
interface UseRouterParamsOptions {
method?: "push" | "replace";
shallow?: boolean;
}
const useRouterParams = (options?: UseRouterParamsOptions) => {
const { query, pathname, push, replace } = useRouter();
@chrismuiruriz
chrismuiruriz / index.html
Created September 10, 2020 09:25
Project X - Home Page
<div id="app" v-if="devMode">
<header>
<nav>
<div class="container">
<ul class="menu">
<li>
<a href-="">Backstory</a>
</li>
</ul>
<a href="#" class="menu-btn" @click.prevent="toggleMobileMenu()">
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" ],
/* (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 */
}