Skip to content

Instantly share code, notes, and snippets.

View juanbrujo's full-sized avatar
:octocat:

Jorge Epuñan juanbrujo

:octocat:
View GitHub Profile
@juanbrujo
juanbrujo / PlayStationBIOSFilesNAEUJP.md
Last active April 19, 2024 05:11
Files for PlayStation BIOS Files NA-EU-JP
@juanbrujo
juanbrujo / comunas-regiones.json
Last active April 14, 2024 22:36 — forked from sergiohidalgo/comunas-regiones-chile.json
Comunas y regiones de chile JSON
{
"regiones": [
{
"region": "Arica y Parinacota",
"comunas": ["Arica", "Camarones", "Putre", "General Lagos"]
},
{
"region": "Tarapacá",
"comunas": ["Iquique", "Alto Hospicio", "Pozo Almonte", "Camiña", "Colchane", "Huara", "Pica"]
},
@juanbrujo
juanbrujo / el-jak.md
Last active March 29, 2024 00:17
el jak pa sacar hora online @ civil register in Chilito

Cómo sacar hora online en registro civil en Chile (Santiago en este caso) que no sea en 6 meses más.

Antecedentes:

  • Es un cacho sacar hora porque te dan minimo pa 2 meses más adelante. Hay varias alternativas como cachar donde ponen camionetas para atenciones rápidas de CI principalmente, pero enfin si quieres tomar una hora pa la oficina y no quieres hacer la fila de los que no sacaron hora estos pasos han sido probados por varios DevsChile®.
  • Intenté hacer un script para automatizar esto pero el Jorge del pasado ya habia conseguido lo que queria con este hack y lo olvidó.

Pasos:

@juanbrujo
juanbrujo / react-app-scrapping.js
Created December 9, 2016 15:35
Scrapping a React App using PhantomJS and Cheerio
var phantom = require('phantom');
var Q = require('q');
var cheerio = require('cheerio');
var _ph, _page, _outObj;
var url = ABSOLUTE_URL; // change here for your React app site
phantom.create().then(ph => {
_ph = ph;
return _ph.createPage();
}).then(page => {
@juanbrujo
juanbrujo / InstallIPTVoverPlexMediaServer.md
Last active March 28, 2024 06:45
Install IPTV channels list over Plex Media Server
@juanbrujo
juanbrujo / npm-starter.js
Last active February 11, 2024 23:16
Starter for a basic NPM module
// moduleName = name of your npm module
var moduleName = (function moduleName() {
"use strict";
// YOUR PRETTY JS CODE THAT WILL CHANGE THE WORLD
// return whatever;
})( this );
@juanbrujo
juanbrujo / multipleEventsListeners.js
Last active October 5, 2023 20:39
Add the capability to attach multiple events to an element, just like jQuery does
/**
* multipleEventsListeners.js
* Add the capability to attach multiple events to an element, just like jQuery does
* https://gist.github.com/juanbrujo/a1f77db1e6f7cb17b42b
*/
function multipleEventsListeners(elem, events, func) {
var event = events.split(' ');
for (var i = 0; i < event.length; i++) {
elem.addEventListener(event[i], func, false);
# Git aliases
alias gitd="git diff -- ':!package-lock.json' ':!yarn.lock'"
alias gitc='git checkout develop'
alias gits='git status'
# Will return the current branch name
# Usage example: git pull origin $(current_branch)
function current_branch() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo ${ref#refs/heads/}
@juanbrujo
juanbrujo / index.html
Created March 13, 2013 21:21
A CodePen by GreenSock. GSAP JS Banner Example - Just an example to show you the type of animation that you can create on devices that don't support Flash. Give it a spin on your iOS device. We think you will like the results. This banner uses a handful CSS properties that require a modern browser. For desktop users we recommend Google Chrome.
<link href='http://fonts.googleapis.com/css?family=Asap:400,700' rel='stylesheet' type='text/css'>
<div id="wrapper">
<div id="banner">
<div class="slide" id="slide2">
<h4>FOR</h4>
</div>
<div class="slide" id="slide1">
<h1>CREATE</h1>
<div id="stunningWrap"><h2 id="stunning">STUNNING</h2></div>
@juanbrujo
juanbrujo / enlarge-photoshop.md
Created May 12, 2023 16:47
How to Resize an Image in Photoshop Without Losing Quality

Step 1: Select the Image Size Command

Go to Image in the menu bar and select Image Size. You can also hit Alt + Ctrl + I (Option + Command + I) on the keyboard.

In the box that pops up, be sure to check the box that says Resample. This ensures that Photoshop will create more pixels to add to the image.

There are a few different options for how Photoshop will perform this feat. Most of the time Automatic or Preserve Details work great. However, some of the others may work better with certain images so feel free to play around.