Skip to content

Instantly share code, notes, and snippets.

View snehesht's full-sized avatar
🎯
Focusing

Snehesh snehesht

🎯
Focusing
View GitHub Profile
SELECT nodes.id AS target
FROM nodes
INNER JOIN permissions AS cdbaafababcdec ON nodes.id = cdbaafababcdec.target INNER JOIN edges AS parentEdges ON nodes.id = parentEdges.child
WHERE cdbaafababcdec.source IN('a6630b37-84be-0d10-3d2e-828df19e2c11', 'aee255bc-1111-4754-b4b9-99c9eb731ac6', '0cc316f9-3add-4070-9639-511854b4c2bf', '7f05aa6a-a0cd-49d2-9a95-f20e9bc345c3', '4a0bd8dc-24ee-4b19-bbf0-6ed6d73ffb87', 'df628c24-bf69-4c90-81cb-54e24ab5e79c', '152b344e-c9e1-4c56-95ce-ea3865d8a9c3', 'ed71e5e5-d5d2-4cf3-a208-a961d15966df', '64f2818b-cd41-49d0-900e-8ab610490bff', '69a6350c-4aa8-4da1-a691-c26f6f7e86d3', '3bce1ea5-012e-4f18-8e5a-64f5ca57c8bb', '9285951e-1f4e-4f52-96dc-6116a5c1d17c', 'a138400b-0912-43a5-9d77-3c5b86a6d468', '885e86a0-b85c-4516-857d-2eb2f75a86fd', '856c30d5-20e0-4b91-9fbb-c5ee08509e56', '5aa9c327-168e-48c6-8ab5-b2f33ab55251', '62c3cc50-0f65-450f-8034-3dfee31b6697', '73ab8806-d0b1-4168-a5a5-462dff5ddaec', '3aaa7d39-930b-48a2-911a-7f8a393e3ab5', 'd5f3a5
@snehesht
snehesht / plink-plonk.js
Created February 16, 2020 01:26 — forked from tomhicks/plink-plonk.js
Listen to your web pages
pgmetrics run at: 14 Feb 2020 4:58:16 PM (now)
PostgreSQL Cluster:
Name: PostgreSQL
Server Version: 11.0 (Ubuntu 11.0-1.pgdg16.04+2)
Server Started: 14 Feb 2020 4:41:59 PM (16 minutes ago)
System Identifier: 6615636975566673716
Timeline: 2
Last Checkpoint: 14 Feb 2020 4:55:12 PM (3 minutes ago)
@snehesht
snehesht / sysctl.conf
Created February 12, 2020 16:54 — forked from voluntas/sysctl.conf
Sysctl configuration for high performance
### KERNEL TUNING ###
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
@snehesht
snehesht / lie-to-me
Last active July 4, 2019 06:01
Lie to DNS requests
#!/bin/sh
# Forked from https://gitlab.com/moviuro/moviuro.bin/blob/master/lie-to-me
set -e
_target="127.0.0.1"
_format="unbound"
__usage () {
cat << EOF
@snehesht
snehesht / readme.txt
Created April 4, 2019 17:16
Build's repos with private git reops
Step 1) Replace url with [email protected]
git config --global url."[email protected]:".insteadOf "https://github.com/"
Step 2) Add github ssh-key
ssh-keygen -t ed25519 -f ~/.ssh/github
chmod 0600 ~/.ssh/github
Step 3) Add ssh key on VM and configure it on .ssh/config
Host github.com
User git
user www-data;
worker_processes 2;
error_log /var/log/nginx/nginx.log;
pid /run/nginx.pid;
worker_rlimit_nofile 8192;
## 4096 Workers per process
events {
use epoll;
worker_connections 4096;
@snehesht
snehesht / ssl-proxies.py
Created August 5, 2018 14:33
SSL Proxies
import re, requests, json;
from html.parser import HTMLParser
class SSLParser(HTMLParser):
def handle_data(self, data):
self.result.append(data)
def setup(self):
self.result = [];
@snehesht
snehesht / index.js
Created July 17, 2018 15:10
Mock Server
const express = require('express')
const bodyParser = require('body-parser')
const app = express()
// app.use(function (req, res, next) {
// req.rawBody = '';
// req.setEncoding('utf8');
// req.on('data', function (chunk) {
@snehesht
snehesht / fonts.css
Created July 12, 2018 15:35
CSS Fonts Hack
/*
* https://css-tricks.com/snippets/css/font-stacks/
* https://css-tricks.com/snippets/css/system-font-stack/
*/
/* Times New Roman-based stack */
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif;
/* Modern Georgia-based serif stack */
font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif;