Skip to content

Instantly share code, notes, and snippets.

View biojazzard's full-sized avatar
😇
I´m a Saint

Alfredo Llanos biojazzard

😇
I´m a Saint
View GitHub Profile
@biojazzard
biojazzard / ASCII-Folder-List.md
Last active April 4, 2017 06:58
ASCII Folder List

ASCII Markdown List

.
+-- Presupuestos
|   +-- ...
+-- Proyectos
|   +-- 1unes
|   	+-- Documentación
|   	+-- Facturas

| +-- src

@biojazzard
biojazzard / Markdown-Folder-List.md
Last active April 7, 2017 14:52
Markdown Folder List

Markdown Folders

|-- Presupuestos
|  └── ...
|-- Proyectos
|  |-- 1unes
|  |  └── Documentación
|  |  └── Facturas
|  |  └── src

| | └── ...

@biojazzard
biojazzard / autocomplete-form.pug
Last active April 2, 2017 20:24
Autocomplete Well Done | 2017
// As seen in:
// https://medium.com/dev-channel/improving-mobile-web-conversions-just-by-optimizing-web-forms-1d846bed42f
form(action='#')
fieldset
legend Address
label
| Name:
input(type='text', name='name', autocomplete='name')
br
@biojazzard
biojazzard / gist:0ae39dbc9ec1c64aa10ba954c048f9e5
Created January 4, 2017 08:36
Numero_Seguridad_Social_RegExp
\s?\d{4}\s?\d{2}\s?\d{7}\s?\d{2}
//LoadCSS
script.
!function(e){"use strict";var n=function(n,t,o){function i(e){return a.body?e():void setTimeout(function(){i(e)})}function r(){l.addEventListener&&l.removeEventListener("load",r),l.media=o||"all"}var d,a=e.document,l=a.createElement("link");if(t)d=t;else{var s=(a.body||a.getElementsByTagName("head")[0]).childNodes;d=s[s.length-1]}var f=a.styleSheets;l.rel="stylesheet",l.href=n,l.media="only x",i(function(){d.parentNode.insertBefore(l,t?d:d.nextSibling)});var u=function(e){for(var n=l.href,t=f.length;t--;)if(f[t].href===n)return e();setTimeout(function(){u(e)})};return l.addEventListener&&l.addEventListener("load",r),l.onloadcssdefined=u,u(r),l};"undefined"!=typeof exports?exports.loadCSS=n:e.loadCSS=n}("undefined"!=typeof global?global:this);!function(t){if(t.loadCSS){var e=loadCSS.relpreload={};if(e.support=function(){try{return t.document.createElement("link").relList.supports("preload")}catch(e){return!1}},e.poly=function(){for(var e=t.document.getElementsByTagName("link"),n=0;n<e.len
@biojazzard
biojazzard / mogrify_recipes.sh
Created December 14, 2016 06:41
Mogrify Recipes
# jpeg to Quality 50%
mogrify -quality 50% *.jpg
# Recursive All jpegs to Quality 50%
mogrify -quality 50% ./*/*.jpg
# FUZZ
mogrify -fuzz 15% -trim +repage *.jpg
# RESIZE
@biojazzard
biojazzard / start_ftp.sh
Created December 8, 2016 18:33
Start OSX 10.9 FTP
# Start OSX FTP
sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist
# Then: ftp localhost
# user|pass
@biojazzard
biojazzard / mkdir.php
Created December 7, 2016 15:35
Make Dir form PHP. [Test permissions.]
<?php
$estructura = "./assets";
if(!mkdir($estructura, 0777, true)) {
die('Fallo al crear las carpetas...');
}
?>
@biojazzard
biojazzard / shopify-product-on-sale-round-to-five.liquid
Created November 18, 2016 09:46
Round to lowest multiple of 5 showing Sales Percent%
{% if product.compare_at_price_max > product.price %}
<span class="product-single__price--wrapper">
<div class="grid-product__on-sale">
<p>- {{ product.compare_at_price_max | minus:product.price | times:100 | divided_by:product.compare_at_price_max | divided_by:5 | times: 5}}%</p>
</div>
<span id="ComparePrice" class="product-single__price--compare-at">
{% if current_variant.compare_at_price > current_variant.price %}
{{ current_variant.compare_at_price | money }}
{% endif %}
</span>
@biojazzard
biojazzard / goprofisheye.command
Created March 8, 2016 21:44
GoPro FishEye Undistort /w CLI | OSX
cd "$(dirname "$0")"
echo "GoPro Fisheye, undistort GoPro images by @biojazzard"
printf "\n"
sleep 3
echo "mogrify must be installed: ex: brew install mogrify"
sleep 3
printf "\n"
echo "Undistort all the images in the current folder or just one? (type all for all pictures or filename for undistorting a custom photo)"
read fisheye
if [[ $fisheye == "all" ]]