Skip to content

Instantly share code, notes, and snippets.

🅰️
In love of JS

Diego Juliao dianjuar

Block or report user

Report or block dianjuar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:8d66d821792d9e1e561b52d77c611658

1. Clone your fork:

git clone git@github.com: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
@dianjuar
dianjuar / catch-web-states.md
Last active Apr 18, 2019
A snippet to know how to catch states of your pages. Hovers, toasters, anything very hard to inspect
View catch-web-states.md

Open your web console and execute the snippet and wait to be executed then inspect the element

var timeToBeExecuted = 1000;
setTimeout(() => {
	debugger;
}, timeToBeExecuted);
@dianjuar
dianjuar / circleci-useful-env-variables-pr.sh
Created Jan 30, 2019
A set of environment variables related to pull request to use in CircleCI. These are for GitHub provider
View circleci-useful-env-variables-pr.sh
# 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 / fix-circleci-repo-ref.sh
Created Jan 29, 2019
When you want to integrate circleCI with sonarqube pull-request analysis, there is no reference to the branch that you want. This scripts fix that
View fix-circleci-repo-ref.sh
# Fix circleci repo reference
# https://community.sonarsource.com/t/code-is-empty-on-pull-request-reviews/822/11
mkdir -p /root/.ssh;
echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==' > /root/.ssh/known_hosts;
git fetch --all;
git branch -D master;
git rev-parse origin/master;
@dianjuar
dianjuar / interviewer-questions.md
Last active Dec 7, 2018
List for questions to make in an interview
View interviewer-questions.md

Role

  • How did this position come to be open?
  • What would my immediate priorities be?
  • What is the performance review process like here?
  • What are the most important skills to have to do well in this job?
  • What is the typical career path for someone in this role?
  • What are the biggest challenges that someone in this position would face?
  • Can you show me examples of projects I would be working on?
  • How will my performance be reviewed? how often? what metrics will be used?
  • When and how is feedback given to me as an employee? (one to one, polls)
@dianjuar
dianjuar / how-to-update-angular-cli.md
Created Oct 21, 2018
How to update the angular CLI npm package
View how-to-update-angular-cli.md

How to update the Angular CLI npm package

Just copy and paste

ng --version; \
  sudo npm uninstall -g @angular/cli; \
  sudo npm cache clean; \
  sudo npm install -g @angular/cli@latest; \
  ng --version;
View stat1-teams-registered.ts
/**
* How many teams are registered
*/
howManyTeamsAreRegistered(): number {
return this.teamsService.getElements().length;
}
@dianjuar
dianjuar / xfce-shortcuts-screenshot.md
Last active May 20, 2019
My xfce shortcuts to take screenshots
View xfce-shortcuts-screenshot.md
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 / android_on_arch.md
Created Apr 10, 2017
install android SDK on arch linix
View android_on_arch.md

Install Android SDK on Arch Linux

1. Download Android SDK on your computer

yaourt android-sdk-platform-tools
yaourt android-udev
yaourt android-sdk

2. Create global variables on system

@dianjuar
dianjuar / WP_ajax_js_.sublime-snippet
Last active Mar 4, 2017
SublimeText Snipets to create a template to make an AJAX request in WordPress
View WP_ajax_js_.sublime-snippet
<snippet>
<content><![CDATA[
/**
* @param {string} security_nonce
* Code of the Nonce. Security Stuff
*/
jQuery(function(\$)
{
// The call trigered
You can’t perform that action at this time.