Skip to content

Instantly share code, notes, and snippets.

View kapillamba4's full-sized avatar

Kapil Lamba kapillamba4

View GitHub Profile
sudo pacman -S postgresql
initdb --locale $LANG -E UTF8 -D '/var/lib/postgres/data'
sudo systemctl start postgresql.service
sudo -u postgres -i
createuser --interactive
root
y
createdb myDatabaseName
psql -d myDatabaseName
sudo pacman -S mysql
sudo mysql_install_db --user=mysql --basedir=/usr/ --ldata=/var/lib/mysql/
sudo systemctl start mariadb.service
/usr//bin/mysqladmin -u root password 'new-password'
#!/bin/bash
for fld in $(find -name "CMakeLists.txt" -printf '%h ')
do
for cmakefile in CMakeCache.txt cmake_install.cmake CTestTestfile.cmake CMakeFiles Makefile
do
rm -rfv $fld/$cmakefile
done
done
set nocompatible " Disable vi-compatibility
set t_Co=256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
set showmode " always show what mode we're currently editing in
registry=https://registry.npmjs.org/
strict-ssl=false
prefix=~/.npm-global
npm reset:
npm i -g npm \ npm cache clean --force -g
.no-select{
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
}
042f3074c1d89a130cc9539ae7f1ecd5989576c7c57fb5003ec4499f766e5fb5ff3715c620d3cf4852efda3c878a39ef4432dea239168475dff07207953fb6f23b
@kapillamba4
kapillamba4 / compassbearing.py
Created January 17, 2018 17:50 — forked from jeromer/compassbearing.py
compass bearing between two points in Python
def calculate_initial_compass_bearing(pointA, pointB):
"""
Calculates the bearing between two points.
The formulae used is the following:
θ = atan2(sin(Δlong).cos(lat2),
cos(lat1).sin(lat2) − sin(lat1).cos(lat2).cos(Δlong))
:Parameters:
- `pointA: The tuple representing the latitude/longitude for the
sudo mysql_upgrade -u root
sudo mysql -u root
sudo systemctl status mariadb
sudo systemctl start mariadb
sudo systemctl stop mariadb
https://wiki.archlinux.org/index.php/MySQL#Unable_to_run_mysql_upgrade_because_MySQL_cannot_start