Skip to content

Instantly share code, notes, and snippets.

View abhijithvijayan's full-sized avatar
👋
Hey I am open for UI frontend roles(if anyone's offering)

Abhijith Vijayan abhijithvijayan

👋
Hey I am open for UI frontend roles(if anyone's offering)
View GitHub Profile
@craigvantonder
craigvantonder / flush-dns.sh
Last active February 3, 2021 04:42
Flushing the DNS in Ubuntu 16.04
#!/bin/bash
# NB: First install nscd with sudo apt-get install nscd
# run this command to flush dns cache:
sudo /etc/init.d/dns-clean restart
# or use:
sudo /etc/init.d/networking force-reload
# Flush nscd dns cache:
sudo /etc/init.d/nscd restart
@tekiegirl
tekiegirl / uniqueId.adoc
Last active March 24, 2021 20:54
Using the graph to control unique id generation.

Using the graph to control unique id generation

Introduction

This gist was prompted by Nigel Small’s tweet of a query to generate a unique id for a node (and is posted here with his agreement). It inspired me to think about how it could be used in a full example, unrestricted by Twitter’s 140 characters. I have also looked at how we could generate different sets of unique ids for different labels.

Auto-incrementing #Neo4j counter MERGE (x:Counter {name:'foo'}) ON CREATE SET x.count = 0 ON MATCH SET x.count = x.count + 1 RETURN x.count

— Nigel Small (@technige) December 16, 2013
@ercoppa
ercoppa / 80-keychron.rules
Last active February 25, 2023 18:30
K2 Keychron Ubuntu 18.04
SUBSYSTEMS=="input", ATTRS{name}=="Keychron K2", RUN+="/bin/sh -c 'echo 0 > /sys/module/hid_apple/parameters/fnmode'"
@bradtraversy
bradtraversy / node_cheerio_scraping.js
Created August 6, 2018 02:55
Simple example to scrape some posts and put into a CSV file using Node & Cheerio
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) {
# GET VERSION
yarn -v (or --version)
# GET HELP
yarn help
# CREATE PACKAGE.JSON
yarn init
yarn init -y // Use defaults
@utek
utek / Exclude_tables.md
Last active October 13, 2023 16:07
Define ignored tables in alembic.ini

Add this in your ini file:

[alembic:exclude]
tables = spatial_ref_sys

In env.py:

    import re 
    
@acutmore
acutmore / README.md
Last active January 21, 2024 20:30
Emulating a 4-Bit Virtual Machine in (TypeScript\JavaScript) (just Types no Script)

A compile-time 4-Bit Virtual Machine implemented in TypeScript's type system. Capable of running a sample 'FizzBuzz' program.

Syntax emits zero JavaScript.

type RESULT = VM<
  [
    ["push", N_1],         // 1
    ["push", False],       // 2
 ["peek", _], // 3
@brunolemos
brunolemos / linkedin-unfollow-everyone.js
Last active February 3, 2024 05:47
Unfollow everyone on Linkedin
(() => {
let count = 0;
function getAllButtons() {
return document.querySelectorAll('button.is-following') || [];
}
async function unfollowAll() {
const buttons = getAllButtons();
@tajnymag
tajnymag / tinder.user.js
Last active March 10, 2024 18:59
Tinder Deblur Userscript (ARCHIVED and DEPRECATED, see https://github.com/tajnymag/tinder-deblur)
// ==UserScript==
// @name Tinder Deblur
// @namespace Violentmonkey Scripts
// @match https://tinder.com/*
// @grant none
// @version 1.4
// @author Tajnymag
// @downloadURL https://raw.githubusercontent.com/tajnymag/tinder-deblur/main/tinder.user.js
// @description Simple script using the official Tinder API to get clean photos of the users who liked you
// ==/UserScript==
@bradtraversy
bradtraversy / flutter_setup.md
Last active March 19, 2024 04:59
Flutter dev setup & notes