Skip to content

Instantly share code, notes, and snippets.

View dianjuar's full-sized avatar

Diego Julião dianjuar

  • Medellín - Colombia
  • 10:57 (UTC -05:00)
  • X @dianjuar
View GitHub Profile
@dianjuar
dianjuar / fix-circleci-repo-ref.sh
Created January 29, 2019 18:28
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
# 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 March 20, 2023 17:34
List for questions to make in an interview

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 / stat1-teams-registered.ts
Last active February 17, 2018 00:18
FIFA Manager PWA
/**
* How many teams are registered
*/
howManyTeamsAreRegistered(): number {
return this.teamsService.getElements().length;
}
@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 / android_on_arch.md
Created April 10, 2017 03:22
install android SDK on arch linix

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 March 4, 2017 06:10
SublimeText Snipets to create a template to make an AJAX request in WordPress
<snippet>
<content><![CDATA[
/**
* @param {string} security_nonce
* Code of the Nonce. Security Stuff
*/
jQuery(function(\$)
{
// The call trigered
@dianjuar
dianjuar / ajax_example.js
Last active March 4, 2017 06:01
A simple WP plugin to know how AJAX works on WordPress
/**
* @param {string} security_nonce
* Code of the Nonce. Security Stuff
*/
jQuery(function($)
{
// The call trigered
$('#publish').click(function(event)
{
@dianjuar
dianjuar / comunite python with nodejs asynchronous.js
Last active March 2, 2017 03:18
Comunicate python process with asyncronush calls with nodejs
var spawn = require('child_process').spawn,
ls = spawn('python',['-u','python.py']);
ls.stdout.on('data', function (data) {
console.log('stdout: ' + data);
});
ls.stderr.on('data', function (data) {
console.log('stderr: ' + data);
});
@dianjuar
dianjuar / run scrapy spider on python script.md
Last active September 9, 2020 07:41
function to run a scrapy crawler on python script

Run a Scrapy spider on script

import scrapy

#--run a crawler in a script stuff
from pydispatch             import dispatcher
from scrapy                 import signals
from scrapy.crawler         import CrawlerProcess
from pydispatch             import dispatcher
@dianjuar
dianjuar / Restore the GRUB Bootloader.md
Last active April 9, 2024 12:56
Restore the GRUB Bootloader on Manjaro Linux. Usefull when your fresh windows install eats your grub and can not boot into your linux installation, or for some how your grub is missing

Restore the GRUB Bootloader on Manjaro

  1. Chroot into your linux instalation
    1. The easiest way is with mhwd-chroot
      1. Install it yaourt -S mhwd-chroot
      2. Run it sudo mhwd-chroot
      3. DONE, you have chrooted into your linux installation (open a root console of your installed linux OS, is like just open a console with root access)
  2. Restore your GRUB
    1. Install a new GRUB bootloader with grub-install /dev/sda
  3. Recheck to ensure the that installation has completed without any errors grub-install --recheck /dev/sda