Skip to content

Instantly share code, notes, and snippets.

View EverettBerry's full-sized avatar
☁️
Cloud Costs

retttx EverettBerry

☁️
Cloud Costs
View GitHub Profile

#Database Cheat Sheet

For MySQL 5.5

  • Change user password in MySQL
    UPDATE mysql.user SET Password=PASSWORD('<new_password>') WHERE User='<user_name>';
    FLUSH PRIVELAGES;
    

Linux Cheet Sheet

Specifically for Ubuntu 12.04 and on

Users

  • Display your user attributes
    id -a

  • Add user to group
    usermod -a -G <group_name> <user_name>

@EverettBerry
EverettBerry / gist:50c4c587f86424d80846
Created June 4, 2014 07:13
Installing sshfs and macvim
sshfs:
1. brew install sshfs
2. sudo /bin/cp -RfX /usr/local/opt/osxfuse/Library/Filesystems/osxfusefs.fs /Library/Filesystems
3. sudo chmod +s /Library/Filesystems/osxfusefs.fs/Support/load_osxfusefs
3. sshfs <username>@<hostname>:/path/to/directory <your directory>
macvim:
1. Download tar file
2. make install the file
3. mv /Users/<username>/Downloads/macvim-snapshot-73/src/MacVim/mvim ~/.rvm/bin
@EverettBerry
EverettBerry / gist:3c23b19f784e439c5834
Last active August 29, 2015 14:23
Install Oracle Java 8 on Ubuntu
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

Two global python packages are all that is really necessary:

sudo apt-get install python-pip
sudo pip install virtualenv

Start virtualenv (used Python3 in this case):

virtualenv <my env> --python=/usr/bin/python3
source <my env>/bin/activate

Keybase proof

I hereby claim:

  • I am everettberry on github.
  • I am retttx (https://keybase.io/retttx) on keybase.
  • I have a public key ASCCw_sQswFSSz6sqfRDlsAFWtCIxf24DkUcExFrvpbmNgo

To claim this, I am signing this object:

Too many authentication failures

ssh -o PubkeyAuthentication=no user@host

Find Hosts on Network

sudo arp-scan --interface=wlp2s0 --localnet

Fix unmet dependencies

sudo dpkg --purge --force-all

GPG error: signatures could not be identified

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys

@EverettBerry
EverettBerry / sql
Created March 10, 2022 16:01
Add Host to MySQL
CREATE USER 'root2'@'127.0.0.1' IDENTIFIED BY 'root';
GRANT ALL PRIVILEGES ON *.* TO 'root2'@'127.0.0.1' WITH GRANT OPTION;
FLUSH PRIVILEGES;