Skip to content

Instantly share code, notes, and snippets.

🦀
grabbing

Tiago Celestino tcelestino

View GitHub Profile
@tcelestino
tcelestino / disable-checkpoint-vpn-autostart.md
Last active Jan 17, 2019
disable autostart Checkpoint's VPN on macOS
View disable-checkpoint-vpn-autostart.md

How can I stop Checkpoint's VPN program from automatically starting on my Mac? Then how do start it manually

To stop it from starting automatically, edit /Library/LaunchAgents/com.checkpoint.eps.gui.plist and change:

<key>RunAtLoad</key>
<true/>

To:

@tcelestino
tcelestino / index.html
Created Dec 3, 2018
customize checkbox
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Checkbox customizado</title>
<style>
label {
display: block;
position: relative;
@tcelestino
tcelestino / composer-install.md
Last active Mar 1, 2019
how to install composer globally on macOS
View composer-install.md

Downloading directly from the composer website

Copy and paste that link – https://getcomposer.org/composer.phar – to your browser. It’s always the latest version of Composer.

After getting it, open your terminal to test it. You need just run that command:

php ~/Downloads/composer.phar --version

I assume that you don’t want to write … every time when you need to use a composer. Let’s move it to bin directory.

@tcelestino
tcelestino / remove-java.txt
Created Aug 30, 2018
how to uninstall jre on mac os
View remove-java.txt
Click on the Finder icon located in your dock
Click on Go in the Finder menu
Click on Utilities
Double-click on the Terminal icon
In the Terminal window Copy and Paste the commands below:
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane
sudo rm -fr ~/Library/Application\ Support/Oracle/Java
View docker-clean.sh
# Kill all running containers.
alias dockerkillall='docker kill $(docker ps -q)'
# Delete all stopped containers.
alias dockercleanc='printf "\n>>> Deleting stopped containers\n\n" && docker rm $(docker ps -a -q)'
# Delete all untagged images.
alias dockercleani='printf "\n>>> Deleting untagged images\n\n" && docker rmi $(docker images -q -f dangling=true)'
# Delete all stopped containers and untagged images.
@tcelestino
tcelestino / ssl.sh
Last active Nov 2, 2017
3 steps to create a ssl certificate on macOS from localhost
View ssl.sh
cd; mkdir .ssl
openssl req -newkey rsa:2048 -x509 -nodes -keyout .ssl/localhost.key -new -out .ssl/localhost.crt -subj /CN=localhost -reqexts SAN -extensions SAN -config <(cat /System/Library/OpenSSL/openssl.cnf <(printf '[SAN]\nsubjectAltName=DNS:localhost')) -sha256 -days 3650
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain .ssl/localhost.crt
@tcelestino
tcelestino / npm-without-sudo.sh
Last active Jun 28, 2017
settings npm without sudo
View npm-without-sudo.sh
npm get prefix
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
@tcelestino
tcelestino / localtunnel.sh
Created Jun 27, 2017
restart's localtunnel when it is stop
View localtunnel.sh
function localtunnel {
lt -s subdomain --port port_number
}
until localtunnel; do
echo "localtunnel server crashed"
sleep 2
done
@tcelestino
tcelestino / fb-curl-messenger.txt
Last active Jul 5, 2017
curl to Facebook's APIs
View fb-curl-messenger.txt
curl -X POST -H "Content-Type: application/json" -d '{
"setting_type":"call_to_actions",
"thread_state":"new_thread",
"call_to_actions":[
{
"payload":"Greeting"
}
]
}' "https://graph.facebook.com/v2.9/me/thread_settings?access_token=PAGE_ACCESS_TOKEN"
View freewifi.sh
alias freewifi="sudo ifconfig en0 ether `openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`"
You can’t perform that action at this time.