Skip to content

Instantly share code, notes, and snippets.

@sergey-dryabzhinsky
sergey-dryabzhinsky / nginx-vhost-proxprox.conf
Last active April 18, 2022 20:15
Nginx virtual host config for Proxmox. To hide pveproxy on 8006 port behind. With working VNC passthrough.
###
# Nginx vhost file to hide Proxmox pveproxy
# For 3.4+, 5.x version.
#
# Do not forget to create file
# /etc/default/pveproxy:
# ALLOW_FROM="127.0.0.1"
# DENY_FROM="all"
# POLICY="allow"
#
@arthurattwell
arthurattwell / dialog.html
Last active August 1, 2022 09:54
Google Sheets script to allow multi-select in cells with data-validation (adapted from https://www.youtube.com/watch?v=dm4z9l26O0I)
<div style="font-family: sans-serif;">
<? var data = valid(); ?>
<form id="form" name="form">
<? if(Object.prototype.toString.call(data) === '[object Array]') { ?>
<? for (var i = 0; i < data.length; i++) { ?>
<? for (var j = 0; j < data[i].length; j++) { ?>
<input type="checkbox" id="ch<?= '' + i + j ?>" name="ch<?= '' + i + j ?>" value="<?= data[i][j] ?>"><?= data[i][j] ?><br>
<? } ?>
<? } ?>
<? } else { ?>
@mhawksey
mhawksey / gist:2252211
Created March 30, 2012 15:15
Google Apps Script to combine data from different sheets (used in http://mashe.hawksey.info/?p=13130)
function combineData(){
var doc = SpreadsheetApp.getActiveSpreadsheet();
var sheets = doc.getSheets(); // get all the sheets
var outSheet = doc.getSheetByName("combined"); // set where we want to write the results
for (i in sheets){ // loop across all the sheets
if (sheets[i].getSheetName().substring(0,9) == "followers"){ // if sheetname starts with 'follower' then
var target = sheets[i].getSheetName().substring(12); // extract users name for target column
var data = getRowsData(sheets[i]); // get extisting data from current sheet
for (j in data){
data[j]["target"] = target; // create a target column with the users name
@Ar0xA
Ar0xA / update-adblock-dnsmasq.sh
Created February 12, 2017 19:40
USG DNS adblock/malwareblock
#!/bin/bash
#
#DNS adblock/malware block for USG
#
#Orginal script: https://community.ubnt.com/t5/UniFi-Routing-Switching/Use-USG-to-block-sites-apps-like-ER/td-p/1497045
#
#Howto: SSH into your USG:
#sudo su -
#vi /config/user-data/update-adblock-dnsmasq.sh (add file content)
#ESC :wq
@Ademking
Ademking / readme.md
Last active November 5, 2023 15:48
💚 Android : How to record events and play them using ADB SHELL

1) Know the event name of touchpad :

Run :

adb shell getevent -pl

Search for : "ABS_MT_TRACKING_ID" - example :

@wacko
wacko / gist:5577187
Last active January 6, 2024 07:31
SSH between Mac OS X host and Virtual Box guest

On Mac OS (host):

Shutdown your VM and do:

VirtualBox > Settings > Network > Add (you will get vboxnet0)

On a terminal ifconfig will show you new interface vboxnet0

VM's Settings > System > check "Enable I/O APIC." VM's Settings > Network > Adapter 2 > host-only vboxnet0

@dillonhafer
dillonhafer / erx.sh
Last active January 11, 2024 09:20
Configure IPv6 ERX
# Taken from https://medium.com/@nurblieh/ipv6-on-the-edgerouter-lite-c95e3cc8d49d
# just a copy in case that goes away someday
# eth1 is my WAN
# switch0 is my LAN
configure
# Firewall Rule 1/2
edit firewall ipv6-name WAN6_IN
@dwallraff
dwallraff / bootstrap.sh
Last active January 22, 2024 19:43
Crostini penguin bootstrap script -- curl -sL dwallraff.com/bootstrap | bash
#! /usr/bin/env bash
#-- Dave Wallraff
# First things first, I'm the realest...
### bootstrap crostini container
# curl -sL dwallraff.com/bootstrap | bash
# wrap in a function for curl|bash
do_stuff() {
@pamolloy
pamolloy / README.md
Last active January 23, 2024 07:28
Ubiquiti USG configuration for Wireguard

Download the latest ugw3 package from https://github.com/Lochnair/vyatta-wireguard/releases and install it on your USG using dpkg -i wireguard-ugw3-<version>.deb.

cd /config/auth
umask 077
mkdir wireguard
cd wireguard
wg genkey > wg_private.key
wg pubkey < wg_private.key > wg_public.key
@Erreinion
Erreinion / Kali Linux xrdp on AWS.txt
Created January 12, 2017 11:06
Setting up xrdp on Kali Linux 2016.2 on AWS
Setting up xrdp on Kali Linux 2016.2 on AWS
AWS has an AMI for Kali 2016.2, but being remote, you need VNC or RDP to access the graphical tools.
VNC is easy to set up but very restrictive. RDP is harder to set up, but easier to use. These are the instructions I use to set up xrdp.
I use this config so that I connect to the Kali VM through an Apache Guacamole RDP proxy. This keeps Kali behind the firewall and in my pentesting lab. Guacamole also allows me to access the Kali box on SSH or RDP via a web interface from anywhere and any device.
OS: Kali Linux 2016.2
AMI: Updated 19 Oct 2016