Skip to content

Instantly share code, notes, and snippets.

View bronze's full-sized avatar
😎

Carlos Bronze bronze

😎
View GitHub Profile
@bronze
bronze / aliases.zsh
Created December 21, 2019 17:05
aliases.zsh
# -------------------------------------------------------------------
# edit zsh configs
# -------------------------------------------------------------------
alias aliases="code ~/.zsh/aliases.zsh"
alias config="code ~/.zsh/aliases.zsh"
alias zshconfig="code ~/.zshrc && reload"
alias reload=". ~/.zshrc && echo 'ZSH config reloaded from ~/.zshrc'"
#alias httpd="code /usr/local/etc/httpd/httpd.conf"
#alias vhosts="code /usr/local/etc/httpd/extra/httpd-vhosts.conf"
#alias vhosts="subl /Users/bronze/Sites/httpd-vhosts.conf"
@bronze
bronze / img.html
Last active April 10, 2021 23:53
gohugo img shortcode
{{/* https://laurakalbag.com/processing-responsive-images-with-hugo/ */}}
{{/* https://dev.to/stereobooster/responsive-images-for-hugo-dn9 */}}
{{/* get file that matches the filename as specified as src="" in shortcode */}}
{{ $src := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) }}
{{/* set image sizes, these are hardcoded for now, x dictates that images are resized to this width */}}
{{ $lqipw := default "20x" }}
{{ $tinyw := default "640x" }}
{{ $smallw := default "960x" }}
@bronze
bronze / gulpfile.js
Last active December 17, 2016 22:00
Kirby CMS gulpfile
// dont really know if it makes such a difference but strict kept giving me warnings on Atom
/* jshint strict: false */
// 'use strict';
var gulp = require('gulp'),
fs = require('fs'),
hash = require('gulp-hash'),
critical = require('critical');
// load plugins
@bronze
bronze / br_geo_chart_google
Last active August 29, 2015 14:00 — forked from gerryster/us_geo_chart_google
updating to BR view
// GeoChart from https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart
// Try out by pasting code into: https://code.google.com/apis/ajax/playground/?type=visualization#geo_chart
function drawVisualization() {
var data = google.visualization.arrayToDataTable([
['State', 'Foo Factor'],
['BR-RJ', 1.2],
['BR-SP', 1],
['BR-MG', 1],
@bronze
bronze / .htaccess
Created September 26, 2011 15:16 — forked from leebyron/.htaccess
Options +FollowSymlinks
RewriteEngine on
# No intersticial for direct reference and self-reference
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://box.leebyron.com/.*$ [NC]
# Add a line item for every website you don't need an intersticial for
# I've added my own website, gmail and facebook
RewriteCond %{HTTP_REFERER} !^http(s)?://([^\.]*.)?leebyron.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://mail.google.com/.*$ [NC]