Skip to content

Instantly share code, notes, and snippets.

View dianjuar's full-sized avatar

Diego Julião dianjuar

  • Medellín - Colombia
  • 09:42 (UTC -05:00)
  • X @dianjuar
View GitHub Profile
@dianjuar
dianjuar / FadeOnTouch.lua
Last active July 1, 2022 01:32
Roblox Scripts
local platform = script.Parent
local isTouched = false
local function fade(fadeDuration: number, reaperance: number)
local fadeIntervals = 29
local intervalFraction = fadeDuration / fadeIntervals
return function ()
if not isTouched then
@dianjuar
dianjuar / a stop job is running for session c2 of user.md
Last active May 15, 2022 12:39
Fixing "a stop job is running for session c2 of user xxx (xs / 1min 30s)"

Fix a stop job is running for session c2 of user xxx (xs / 1min 30s)

enter image description here

This advice is pointing to arch based distributions. Manjaro in special

Install watchdog

# pacman -S watchdog >

@dianjuar
dianjuar / xfce-shortcuts-screenshot.md
Last active February 11, 2022 08:33
My xfce shortcuts to take screenshots
Command Shortcut
xfce4-screenshooter --fullscreen --clipboard Ctrl + PrtScrn
xfce4-screenshooter --fullscreen --save /home/dianjuar/Pictures PrtScrn
xfce4-screenshooter --region --clipboard Ctrl + Shift + PrtScrn
xfce4-screenshooter --region --save /home/dianjuar/Pictures Shift + PrtScrn
xfce4-screenshooter --window --clipboard Ctrl + Super + PrtScrn
xfce4-screenshooter --window --save /home/dianjuar/Pictures Super + PrtScrn
@dianjuar
dianjuar / SonarQube dockerized.md
Created February 6, 2022 07:16
Sonarqube dockerized

To init the server

  • npm run sonar:init-server To run the analysis
  • npm run sonar:analysis

To inspect the analysis, go to http://localhost:9000. The credentials are admin and password 12345

@dianjuar
dianjuar / closure-exercicse.md
Last active January 4, 2022 15:00
JS Interview Questions Snipets

What would be the output of these?

1

function() {
  this.foo = 'bar';
  const dummyFn = () => this.foo;

  console.log(dummyFn());
}
@dianjuar
dianjuar / circleci-useful-env-variables-pr.sh
Created January 30, 2019 05:34
A set of environment variables related to pull request to use in CircleCI. These are for GitHub provider
# Pull Request ID
export BC_PR_ID="${BC_PR_ID:-${CI_PULL_REQUEST##*/}}";
REPO=$CI_PULL_REQUEST;
REPO=${REPO##https://github.com/};
REPO=${REPO%%/pull/$BC_PR_ID};
# Repo Slug
export BC_REPO_SLUG=$REPO;
@dianjuar
dianjuar / sonarqube-dockerized.sh
Last active November 6, 2021 18:59
How to work with SonarQube in a dockerized way
# Download the image
docker pull sonarqube
docker pull sonarsource/sonar-scanner-cli
# Create the container
docker run --name=sonarqube -p 9000:9000 sonarqube
# Star the stoped container
docker start sonarqube --interactive
@dianjuar
dianjuar / run-any-exec-nx.bash
Created October 20, 2021 05:19
Run any executor on a Nx Workspace:
nx run your-project:executor
@dianjuar
dianjuar / binary-tree.ts
Last active October 10, 2021 01:48
Utils to manage perfect binary trees
import { TreeNode } from './node';
export class PerfectBinaryTree<T> {
/**
* The height or levels the binary tree
*/
private _height: number;
public get height(): number {
return this._height;
}
@dianjuar
dianjuar / check-postgres-extension-and-schema.md
Created September 17, 2021 16:35
Check which extension belongs to which schema

Verify what Postgres extension belongs to what schema

SELECT
    e.extname AS "Name",
    e.extversion AS "Version",
    n.nspname AS "Schema",
    c.description AS "Description" 
FROM pg_catalog.pg_extension e 
LEFT JOIN pg_catalog.pg_namespace n