Skip to content

Instantly share code, notes, and snippets.

View geekykant's full-sized avatar

Sreekant Shenoy geekykant

View GitHub Profile
@geekykant
geekykant / authentication_with_express_postgres.md
Created November 28, 2019 15:46 — forked from laurenfazah/authentication_with_express_postgres.md
Authentication with an Express API and Postgres

Authentication with an Express API and Postgres

Setting Up

Let's make sure our Express app has the required base modules:

# within root of API
npm install --save express pg knex bcrypt
npm install --save-dev nodemon
@geekykant
geekykant / example-virtual-host.ssl.test.conf
Created March 28, 2020 08:51 — forked from ankurk91/example-virtual-host.ssl.test.conf
Sample virtual host .conf file for Apache2 on Ubuntu
# This to be used when you need to implement SSL
# Make sure that apache mod_ssl is on
# You can generate self signed certificates for development
# http://www.selfsignedcertificate.com/
<VirtualHost *:443>
ServerName yourapp.test
#ServerAlias www.yourapp.test
@geekykant
geekykant / repo-reset.md
Created October 11, 2020 05:15 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
/// ytstayactive.js
// ==UserScript==
// @name YouTube - Stay Active and Play Forever
// @namespace q1k
// @version 3.1.1
// @description Tired of Youtube pausing playback asking you to click 'yes' to continue playing? This script will make the popup never appear, music will never stop. Never pause, never inactive, never worry. The script will keep you active and keep playing music FOREVER. Enables playing in background on mobile.
// @author q1k
// ==/UserScript==
Object.defineProperties(document, { /*'hidden': {value: false},*/ 'webkitHidden': {value: false}, 'visibilityState': {value: 'visible'}, 'webkitVisibilityState': {value: 'visible'} });
setInterval(function(){