Skip to content

Instantly share code, notes, and snippets.

View bronze's full-sized avatar
😎

Carlos Bronze bronze

😎
View GitHub Profile
@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]
@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 / 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 / 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 / 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 / terminal_updates.zsh
Created December 21, 2019 17:06
terminal_updates.zsh
#!/bin/zsh
autoload -U colors
colors
echo $fg_bold[green] "1/7 brew update"$fg_no_bold[default]
brew update
echo $fg_bold[green] "2/7 brew upgrade"$fg_no_bold[default]
brew upgrade
echo $fg_bold[green] "3/7 brew cleanup"$fg_no_bold[default]
brew cleanup
#brew prune
UUID=554d70bb-d070-49ea-975c-50e57ea897b6 /coding ext4 defaults,noatime 0 2
UUID=0d060313-aa09-4cd9-9baa-0627cf36b6ea /files ext4 defaults,noatime 0 2
https://github.com/coldfix/udiskie
https://unix.stackexchange.com/questions/170549/how-to-disable-automount-for-external-devices-in-opensuse-13-2
https://archived.forum.manjaro.org/t/wiki-howto-permanent-mount-for-partition/26187
systemctl stop udisks2.service
systemctl mask udisks2
@bronze
bronze / warframeAutohotkey.ahk
Last active June 5, 2021 01:14
Warframe Autohotkey
; Modifiers: [+ = Shift] [^ = Ctrl] [# = Win] [! = Alt] [* = Ignores modifiers] [~ = Also uses original function] [$ = Forces hook, preventing hotkey from triggering itself] More info here: https://www.autohotkey.com/docs/KeyList.htm
; All time values listed are in ms(MilliSeconds), which are 1/1000 of a second. 1000/delay = activationsPerSecond. I.e: 50ms delay -> 1000/50 = 20 per sec
; Time values are typically rounded up to a multiple of 10ms by the Windows time-keeping system. So there's no point to Timer/Sleep values that aren't multiples of 10. Higher precision may be achieved via Loop+DllCall, but is rarely relevant and certainly doesn't matter for this script
#NoEnv
; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input
;Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%
@bronze
bronze / .zshrc
Last active November 3, 2021 03:53
Zsh
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/bronze/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes