Skip to content

Instantly share code, notes, and snippets.

Avatar
🤒
60hours shift keeping me busy

Abhijith Vijayan abhijithvijayan

🤒
60hours shift keeping me busy
View GitHub Profile
@abhijithvijayan
abhijithvijayan / keychron_k2.adoc
Created March 22, 2023 19:13 — forked from judaew/keychron_k2.adoc
Keychron K2 Manual
View keychron_k2.adoc

Keychron K2 Manual

Connect Bluetooth

On the side of the keyboard, switch the toggle to Bluetooth. Press fn+1 3 seconds and pair with device named Keychron K2.

  • fn+1 connect to 1st device

  • fn+2 connect to 2nd device

  • fn+3 connect to 3rd device

View clear-tax-rent-receipt.js
// For https://cleartax.in/save/rent
// date of repayment against the receipt number
var dateOfPayments = {
1: "Apr 02 2022",
2: "May 01 2022",
3: "Jun 02 2022",
4: "Jul 04 2022",
5: "Aug 03 2022",
6: "Sep 04 2022",
View node-npm-cypress.md
  • JavaScript runs on browser in Browser's JavaScript engine(V8 in Chrome, Spidermonkey in firefox, etc)
  • Somebody ported V8 engine and made it installable in server. This is what is Node.js.
  • You can run JavaScript in node.js(instead of the browser)
  • Even servers can be written in node.js(with libraries like express.js)
  • With Node.js unlimited possibilities arose
  • Thats how Node.js Packages were born(now known as npm packages)
  • These are just some javascript files published into some registry(like a telephone registry but for js packages)
  • npmjs.com is a good package registry widely used
  • In node.js, then came the need to manage these packages(as people wanted to use packages written by other folks)
  • so package managers like npm(by npmjs.com) and yarn(by facebook) was born (// These tools are similar to Maven in Java)
@abhijithvijayan
abhijithvijayan / Readme.md
Created June 6, 2020 18:35 — forked from leopoldodonnell/Readme.md
Install and run Postgres with an extension using docker-compose
View Readme.md

Local Postgres

This gist is an example of how you can simply install and run and extended Postgres using docker-compose. It assumes that you have docker and docker-compose installed and running on your workstation.

Install

  • Requires docker and docker-compose
  • Clone via http: git clone https://gist.github.com/b0b7e06943bd389560184d948bdc2d5b.git
  • Make load-extensions.sh executable
  • Build the image: docker-compose build
@abhijithvijayan
abhijithvijayan / sum-mismatch-ubuntu.md
Created January 5, 2020 09:43
ubuntu 18.04 hash sum mismatch
View sum-mismatch-ubuntu.md
sudo rm -rf /var/lib/apt/lists/*

sudo apt-get update -o Acquire::CompressionTypes::Order::=gz

sudo apt-get update && sudo apt-get upgrade
@abhijithvijayan
abhijithvijayan / pipenv_cheat_sheet.md
Created December 13, 2019 06:43 — forked from bradtraversy/pipenv_cheat_sheet.md
Pipenv cheat sheet for common commands
View pipenv_cheat_sheet.md

Pipenv Cheat Sheet

Install pipenv

pip3 install pipenv

Activate

pipenv shell
View mysql_cheat_sheet.md

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@abhijithvijayan
abhijithvijayan / node_cheerio_scraping.js
Created December 13, 2019 06:42 — forked from bradtraversy/node_cheerio_scraping.js
Simple example to scrape some posts and put into a CSV file using Node & Cheerio
View node_cheerio_scraping.js
const request = require('request');
const cheerio = require('cheerio');
const fs = require('fs');
const writeStream = fs.createWriteStream('post.csv');
// Write Headers
writeStream.write(`Title,Link,Date \n`);
request('http://codedemos.com/sampleblog', (error, response, html) => {
if (!error && response.statusCode == 200) {
@abhijithvijayan
abhijithvijayan / docker-help.md
Created December 13, 2019 06:42 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips
View docker-help.md

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info