Skip to content

Instantly share code, notes, and snippets.

@DGZN
DGZN / ps1
Created January 25, 2023 11:17
https://ea66-2607-fb91-1120-5e76-bc8e-c90a-2264-3b6c.ngrok.io
@DGZN
DGZN / package.json-repl-script.md
Last active June 13, 2022 00:48
package.json repl script

.repl.js

/* Console logs function source code */
 global.viewsource = fnName => console.log(fnName+'')
 
 /* Console dir (like util.inspect) pass { depth: null } for unlimited levels of nesting */
 global.inspect = (...arguments) => console.dir(...arguments)

 /* Normalize file paths cross platform */
 global.require = path => require(require('path').normalize(path))
@DGZN
DGZN / Auto-Hide-Youtube-Ads.md
Last active September 18, 2020 14:39
JS Snippet to auto close text or video ads blocking video playback on Youtube

Youtube Ad Blocker

Run from DevTools as Snippet or paste in console

Open DevTools Command+Option+J (Mac) or Control+Shift+J (Windows)

if (window.location.href.indexOf('youtube.com')) {
  setInterval(function(){
    if (document.querySelector('.ytp-ad-info-dialog-mute-button')) {
      document.querySelector('.ytp-ad-info-dialog-mute-button').click()
      if (document.querySelector('.ytp-ad-feedback-dialog-reason-input').checked = true) {
 document.querySelector('.ytp-ad-feedback-dialog-confirm-button').click() 
@DGZN
DGZN / nodejs-boilerplate-config.md
Created September 15, 2020 13:35
Boilerplate Configuration for NodeJs Project with Jest

PACKAGE.JSON

{
  "scripts": {
    "test": "yarn jest --watchAll"
  },
  "jest": {
    "runner": "jest-runner-eslint",
 "displayName": "TDD Test Suite",
@DGZN
DGZN / Install_Wifi_Hacking_Tools_RSP.sh
Last active October 27, 2022 17:24
Bash WiFi Hacking Tools on Raspberry Pi
echo "INSTALLING UTILITIES"
sudo apt-get update
cd ~/
wget http://http.us.debian.org/debian/pool/main/libx/libxcrypt/libxcrypt1_2.4-3.1_armhf.deb
wget http://http.us.debian.org/debian/pool/main/libx/libxcrypt/libxcrypt-dev_2.4-3.1_armhf.deb
dpkg -I libxcrypt1_2.4-3.1_armhf.deb libxcrypt-dev_2.4-3.1_armhf.deb
sudo apt-get install -y build-essential libpcap-dev libssl-dev git curl zlib1g-dev subversion openssl libreadline6-dev git-core zlib1g libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf automake libtool bison xterm
@DGZN
DGZN / Public-Records-Search.sh
Last active December 3, 2023 15:44
Find person by name in public datasets
# Simple bash script to search fastpeoplesearch
#
# SETUP
# curl -sL https://bit.ly/3PFCGWh -o ~/records-search.sh && chmod +x records-search.sh && ~/records-search.sh
#
# https://bit.ly/3PFCGWh redirects to https://gist.githubusercontent.com/DGZN/11588c0ead968a1bdb0f0de37badefac/raw/
#
#!/bin/bash
@DGZN
DGZN / Samsung-Remote.js
Created May 24, 2017 17:29
Samsung Smart TV Remote
'use strict'
var SamsungRemote = require('samsung-remote');
var remote = new SamsungRemote({
ip: '10.0.1.36', // required: IP address of your Samsung Smart TV
port: '7676'
});
const status = (cb) => {
@DGZN
DGZN / webpack.config.js
Created August 29, 2016 20:46 — forked from learncodeacademy/webpack.config.js
Sample Basic Webpack Config
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/scripts.js",
output: {
path: __dirname + "/js",
filename: "scripts.min.js"
@DGZN
DGZN / Source Grok
Created June 3, 2016 03:44
Source code empathy
alias ick='ack -i --pager="less -R -S -X"'
@DGZN
DGZN / Album.xml
Created September 16, 2015 22:24
Album XML Schema
<?xml version="1.0" encoding="utf-8"?>
<song id="song-reference_id-003" parent_id="album-reference_id-001" track_number="1" has_video="false" >
<meta language="en">
<name>Melody Song 01</name>
</meta>
</song>