Skip to content

Instantly share code, notes, and snippets.

@vitorbritto
vitorbritto / rm_mysql.md
Last active April 23, 2024 14:21
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

    brew remove mysql
    
@stormpython
stormpython / how_to_set_up_ssh_keys.md
Last active August 10, 2023 03:33
Setting up ssh keys for remote server access

How to Set up SSH Keys

Create the RSA Key Pair

ssh-keygen -t rsa

Store the Keys and Passphrase

Once you have entered the Gen Key command, you will get a few more questions:

@border
border / gocookies.go
Created December 7, 2013 07:27
go cookiejar demo
package main
import (
"io/ioutil"
"log"
"net/http"
"net/http/cookiejar"
)
var gCurCookies []*http.Cookie
{
".123" : "application/vnd.lotus-1-2-3",
".3dml" : "text/vnd.in3d.3dml",
".3g2" : "video/3gpp2",
".3gp" : "video/3gpp",
".a" : "application/octet-stream",
".aab" : "application/x-authorware-bin",
".aac" : "audio/x-aac",
".aam" : "application/x-authorware-map",
".aas" : "application/x-authorware-seg",
@sentientwaffle
sentientwaffle / open-in-new-tab.js
Created November 18, 2012 17:20
Open link in new tab
// Source: http://jsfiddle.net/3ZmvS/5/
function openNewTab(url) {
var a = document.createElement("a")
, ev = document.createEvent("MouseEvents")
a.href = url
ev.initMouseEvent( "click", true, true, window
, 0, 0, 0, 0, 0, true, false
, false, false, 0, null )
@chrisjlee
chrisjlee / my.cnf
Created June 22, 2012 15:28
my.cnf file optimized for InnoDB 64bit setups
# forked from http://forge.mysql.com/tools/tool.php?id=137
[client]
#password = [your_password]
port = 3306
socket = /tmp/mysqld.sock
# *** Application-specific options follow here ***
#
@kamermans
kamermans / fail2ban-allstatus.sh
Created July 11, 2011 17:06
Show status of all fail2ban jails at once
#!/bin/bash
JAILS=`fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g'`
for JAIL in $JAILS
do
fail2ban-client status $JAIL
done