Skip to content

Instantly share code, notes, and snippets.

View kapillamba4's full-sized avatar

Kapil Lamba kapillamba4

  • Flipkart
  • Delhi, India
View GitHub Profile
@kapillamba4
kapillamba4 / gist:ccc322c0fcd93eb6c4a55e014cbe79c8
Created October 10, 2017 10:03 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@kapillamba4
kapillamba4 / pacman.md
Created November 15, 2017 07:57
ArchLinux Pacman Cheatsheet

Update package list

sudo pacman -Syy

Update and upgrade all

sudo pacman -Syu

Install specific package

sudo pacman -S pkgname

Find available packages

#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef long double LD;
#define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define sortAndUnique(a) sort((a).begin(), a.end()), (a).erase(unique((a).begin(), (a).end()),(a).end())
double tick() {
static clock_t oldticks;
clock_t newticks = clock();
@kapillamba4
kapillamba4 / mariadb_basics.md
Created January 12, 2018 21:16 — forked from Garbee/mariadb_basics.md
MariaDB basics

Create Database

CREATE DATABASE {table name};

Create User

CREATE USER '{user name}'@'localhost' IDENTIFIED BY '{pass}';
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
@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
042f3074c1d89a130cc9539ae7f1ecd5989576c7c57fb5003ec4499f766e5fb5ff3715c620d3cf4852efda3c878a39ef4432dea239168475dff07207953fb6f23b
.no-select{
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
}
npm reset:
npm i -g npm \ npm cache clean --force -g
registry=https://registry.npmjs.org/
strict-ssl=false
prefix=~/.npm-global