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 / .zshrc
Last active May 4, 2023 13:49
Some useful Git aliases for ~/.zshrc
# Git aliases
alias gitd="git diff -- ':!package-lock.json' ':!yarn.lock'"
alias gitc='git checkout development'
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 / demo.less
Created February 3, 2015 17:40
@font-face LESS Mixin
// USE
.font-face(Ubuntu-Regular, 'https://dl.dropbox.com/u/1220078/ubuntu-new/Ubuntu-Regular-webfont', 400, normal);
.font-face(Ubuntu-Italic, 'https://dl.dropbox.com/u/1220078/ubuntu-new/Ubuntu-Regular-Italic-webfont', 400, italic);
.font-face(Ubuntu-Bold, 'https://dl.dropbox.com/u/1220078/ubuntu-new/Ubuntu-Bold-webfont', 700, normal);
.test {
.font(Ubuntu-Regular, 1em, normal, normal);
h1 {
.font(Ubuntu-Bold, 1.7em, bold, normal);
}
@juanbrujo
juanbrujo / netlify.toml
Created September 28, 2020 14:06
Netlify configuration for routes in a SPA
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
@juanbrujo
juanbrujo / form-netlify.css
Last active September 4, 2022 19:39
JS function to send by AJAX a form data to Netlify Forms
.result {
display: none;
}
.active {
display: block;
}
.inactive {
display: none;
@juanbrujo
juanbrujo / face-anonymize.py
Last active June 24, 2022 01:40
Anonymize facial data on video: blur people’s faces using OpenCV
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Author: Lima Vallantin
https://medium.com/@limavallantin
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
@juanbrujo
juanbrujo / santorales-catolicos.json
Last active May 22, 2022 19:38
Santorales católicos por mes en formato JSON
{
"enero":[
"María, Madre de Dios",
"Basilio, Gregorio",
"Genoveva",
"Yolando, Rigoberto",
"Emilia",
"Wilma, Melanio",
"Raimundo",
"Luciano, Eladio",
@juanbrujo
juanbrujo / YoutubeSearchBookmarklet.js
Created January 16, 2017 15:02
Youtube Search Bookmarklet
javascript:(function(){
var youtube = 'https://www.youtube.com/results?search_query=';
var query = prompt('video query');
if(query != '') {
document.location.href = youtube + query;
}
})();
@juanbrujo
juanbrujo / simple-preloader.vue
Created December 14, 2021 11:01
SImplest Vue2 preloader component
<template>
<div class="preloader">
<div class="f_circleG frotateG_01"></div>
<div class="f_circleG frotateG_02"></div>
<div class="f_circleG frotateG_03"></div>
<div class="f_circleG frotateG_04"></div>
<div class="f_circleG frotateG_05"></div>
<div class="f_circleG frotateG_06"></div>
<div class="f_circleG frotateG_07"></div>
<div class="f_circleG frotateG_08"></div>
@juanbrujo
juanbrujo / sharebuttons.html
Last active December 14, 2021 07:19
lightweight share buttons with vanilla javascript
<a href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>" class="share facebook">Facebook</a>
<a href="https://twitter.com/intent/tweet?url=<?php the_permalink(); ?>&text=<?php the_title(); ?>&via=twitter" class="share twitter">Twitter</a>
<a href="https://plus.google.com/share?url=<?php the_permalink(); ?>" class="share google">Google+</a>
<a href="http://www.linkedin.com/shareArticle?mini=true&url=<?php the_permalink(); ?>&source=LinkedIn.com&title=<?php the_title(); ?>" class="share linkedin">LinkedIn</a>
@juanbrujo
juanbrujo / stylelint-classname-regex.js
Created November 19, 2021 00:37
promote css class-names
module.exports = {
rules: {
'selector-class-pattern': '^[a-z]+(-[a-z]+)*$'
}
}
// test: https://regex101.com/r/4ChNan/2