Skip to content

Instantly share code, notes, and snippets.

View carmolim's full-sized avatar

Augusto Carmo carmolim

View GitHub Profile
@carmolim
carmolim / proxy-toggle.sh
Created October 20, 2022 13:00 — forked from mnewt/proxy-toggle.sh
trivial command to toggle Mac OS X SOCKS proxy
#!/bin/sh
PROXY_INTERFACE="USB Ethernet"
PROXY_HOST=localhost
PROXY_PORT=1080
if [[ $1 == "on" ]]; then
sudo networksetup -setsocksfirewallproxy "$PROXY_INTERFACE" $PROXY_HOST $PROXY_PORT
echo "SOCKS proxy enabled"
@carmolim
carmolim / gist:7b63da2e1d9240263934f6577b157e4c
Created June 19, 2018 18:56 — forked from samuelsimoes/gist:3011642
Ajax no Wordpress. Faça do jeito certo!

#Ajax no Wordpress

###functions.php (ou arquivo incluído)

<?php

#Registra o seu script com o seu ajax no functions.php, no meu caso samuel.js
wp_register_script('samuel', get_bloginfo('template_directory') . "/scripts/samuel.js", array('jquery'));
@carmolim
carmolim / 0_reuse_code.js
Created July 7, 2016 20:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console