Skip to content

Instantly share code, notes, and snippets.

View anthuanvasquez's full-sized avatar
🏁
Never Give Up!

Anthuan Vásquez anthuanvasquez

🏁
Never Give Up!
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
@hhhonzik
hhhonzik / deploy.yml
Last active March 27, 2025 14:28
Kinsta Deployment
# Kinsta Deployment through Github Actions for Bedrock/Sage.
#
# Placed at: .github/workflow/deploy.yml
#
# Process should be studied from code, but some quick brief:
# - runs composer / sage installation
# - moves correct `.env.*` file for multiple configs
# - uses rsync to sync files, uses /.rsyncignore file to exclude whatever should not be there
# - symlinks uploads folder and symlink release folder to kinsta public hostname
# - if you want to clear cache, please uncomment the last job
@joshnuss
joshnuss / app.js
Last active November 4, 2025 22:39
Express.js role-based permissions middleware
// the main app file
import express from "express";
import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db)
import authenticate from "./authentication"; // middleware for doing authentication
import permit from "./authorization"; // middleware for checking if user's role is permitted to make request
const app = express(),
api = express.Router();
// first middleware will setup db connection
@JeffreyWay
JeffreyWay / countries.php
Created July 23, 2015 17:01
Country Names + Codes
[
"United States" => "us",
"Afghanistan" => "af",
"Albania" => "al",
"Algeria" => "dz",
"American Samoa" => "as",
"Andorra" => "ad",
"Angola" => "ad",
"Anguilla" => "ai",
"Antarctica" => "aq",
@devinsays
devinsays / gist:884d6abe92857a329d99
Created May 27, 2014 21:02
Options Framework Top Level Options
function add_custom_options_page() {
$menu = $this->menu_settings();
switch( $menu['mode'] ) {
case 'menu':
// http://codex.wordpress.org/Function_Reference/add_menu_page
$this->options_screen = add_menu_page(
$menu['page_title'],
@bekapod
bekapod / local.xml
Created January 29, 2014 15:41
MAGENTO: Breadcrumbs on Account Pages
<?xml version="1.0"?>
<layout version="0.1.0">
<!--
///////////////////////////////////////////////////////
/////// BREADCRUMBS IN CUSTOMER ACCOUNT AREA ////////
///////////////////////////////////////////////////////
add default crumbs to display in all the customer account pages
this will add Home / My Account crubms.
-->
@Maksold
Maksold / local.xml
Last active May 28, 2021 20:02
#magento #xml - local.xml boilerplate
<?xml version="1.0"?>
<layout>
<default>
<!--Root/Default Layouts-->
<reference name="root">
<!--Appending Block-->
<block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
</reference>
<!--CSS and JS Files-->
@anthuanvasquez
anthuanvasquez / buttonActive.css
Last active January 12, 2019 01:28
Con este CSS, al hacer clic en el enlace, el texto de éste se moverá hacia abajo 1px.
a:active {
position: relative;
top: 1px;
}