Skip to content

Instantly share code, notes, and snippets.

View waltercruz's full-sized avatar
☸️
meditating

Walter Rodrigo de Sá Cruz waltercruz

☸️
meditating
View GitHub Profile
@waltercruz
waltercruz / .htaccess
Created November 22, 2021 20:30 — forked from cipriantepes/.htaccess
GravityForms fix 403 admin-ajax.php
### DISABLE mod_security firewall
### Some rules are currently too strict and are blocking legitimate users
### We only disable it for URLs that contain the regex below
### The regex below should be placed between "m#" and "#"
### (this syntax is required when the string contains forward slashes)
### @src https://stackoverflow.com/questions/12928360/how-can-i-disable-mod-security-in-htaccess-file
<IfModule mod_security.c>
<If "%{REQUEST_URI} =~ "m#/wp-admin/admin.php?page=gf_edit_forms/#">
SecFilterEngine Off
</If>
@waltercruz
waltercruz / post-merge
Created October 26, 2017 17:39 — forked from halian-vilela/post-merge
Verlindo Git Merge
#!/bin/bash
NC="\033[0m" # No Color
ORANGE_W="\033[1;33m"
GREEN_W="\033[1;32m"
BUILD_DIR=../build
SRC_DIR=`pwd`
MESSAGE=`git log -1 --pretty=%B`
// Diatonic Chord Trigger
var notes = ["C", "C#/Db", "D", "D#/Eb", "E", "F", "F#/Gb", "G", "G#/Ab", "A", "A#/Bb", "B"];
var PluginParameters = [
{ name: "Parent Key", type: "menu", valueStrings:notes, defaultValue: 0 }
];
var debug = true;
function rootKey() {
return GetParameter("Parent Key");
// breakpoints
$S: 460px;
$M: 768px;
$L: 1170px;
// media queries
@mixin MQ($canvas) {
@if $canvas == S {
@waltercruz
waltercruz / install-pygtk.sh
Created August 6, 2011 03:59 — forked from ches/install-pygtk.sh
Install PyGTK via Homebrew and virtualenv
# This LOOKS pretty straightforward, but it took awhile to sort out issues with
# py2cairo and pygobject, so I hope I've saved you some time :-)
#
# This assumes you already subscribe to a nice clean virtualenvwrapper workflow
# -- see https://gist.github.com/771394 if you need advice on getting there.
# There are some optional dependencies omitted, so if you're going to be doing
# heavy development with these libs, you may want to look into them.
#
# We go to some configure option pains to avoid polluting the system-level
# Python, and `brew link`ing Cairo which is keg-only by default.
import tweepy
auth = tweepy.OAuthHandler(consumer_token, consumer_secret)
auth.get_xauth_access_token(username, password)
# you can then use this for API access...
api = tweepy.API(auth)
api.update_status("hello")
# to get the access token object for storing...