Skip to content

Instantly share code, notes, and snippets.

View petersgiles's full-sized avatar
💭
forking everything

Pete petersgiles

💭
forking everything
View GitHub Profile
@petersgiles
petersgiles / itunes_dedup.py
Last active January 15, 2023 20:38
Dedup Itunes library
# Please be very careful while using this script, as the os.remove(file_path) command will delete the file permanently.
# Make sure you have a backup of your iTunes library before running this script.
# Also, this script will only prompt the user for deleting the duplicate files in the album that contains duplicate files.
import os
import hashlib
itunes_library = "/path/to/iTunes/Library"
# Create a dictionary to store file hashes
for run in {0001..0999}; do curl "https://inspirobot.me/api?generate=true" | xargs curl -o inspirobot-${run}.jpg; done
@petersgiles
petersgiles / install-clamav-osx.md
Created June 3, 2018 10:39 — forked from gagarine/install-clamav-osx.md
Howto Install clamav on OSX with brew

Howto Install clamav on OSX with brew

$ brew install clamav
$ cd /usr/local/etc/clamav
$ cp freshclam.conf.sample freshclam.conf

Open freshclam.conf and comment the "Example" line:

1.0 SAVAGE PARANOIA

Stay Alert! - Trust No one! - Keep your laser handy!

1.1 The Setting

May we recommend "Paranoia XP" from Mongoose Publishing. Go read that then come back here. go on... we can wait done? ok, moving on...

1.2 Setting Rules for "Savage" Paranoia

@petersgiles
petersgiles / osx-install-clamav.md
Created October 1, 2017 09:44
install clamav with homebrew

Howto Install clamav on OSX with brew

$ brew install clamav
$ cd /usr/local/etc/clamav
$ cp freshclam.conf.sample freshclam.conf

Open freshclam.conf and comment the "Example" line:

@petersgiles
petersgiles / NuGet_profile.ps1
Created September 14, 2017 00:25
Change Colours in Package Manager Console
# $profile to find path i.e. NuGet_profile.ps1
$opt = (Get-Host).PrivateData
$opt.WarningBackgroundColor = "Orange"
$opt.WarningForegroundColor = "White"
$opt.ErrorBackgroundColor = "Red"
$opt.ErrorForegroundColor = "White"
@petersgiles
petersgiles / 2Eto5E-conversion-summary.md
Created September 9, 2017 01:05
2E to 5E simple conversion guidelines

Updated 10 February 2015 (added link to Monster Traits and Actions)

This is the third in my series of conversion documents for D&D 5th Edition. (You can find the one for Next here and the one for 3.5/3E/Pathfinder here.) I created this document by comparing the 5E versions of monsters from the Monster Manual with their 2E counterparts. I also referred to two sources for converting monsters from 2E to 3E: Wizards’ official

@petersgiles
petersgiles / docx2md.md
Created September 9, 2017 01:00 — forked from aembleton/docx2md.md
Convert a Word Document into MD

Converting a Word Document to Markdown in One Move

The Problem

A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.

Installing Pandoc

On a mac you can use homebrew by running the command brew install pandoc.

The Solution

@petersgiles
petersgiles / SetUnblockPolicy.ps1
Created September 2, 2017 09:44 — forked from gbiellem/SetUnblockPolicy.ps1
Turn off Downloads being "Blocked"
$reg = @{
Path = 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments'
Name = 'SaveZoneInformation'
PropertyType = 'DWORD'
Value = 1
}
if (-not (Test-Path -Path $reg.Path)) {
New-Item $reg.Path
}
@petersgiles
petersgiles / entry.js
Created May 30, 2017 21:56 — forked from DevWurm/entry.js
angular-cli Electron configuration
const {app, BrowserWindow} = require('electron')
const path = require('path')
const url = require('url')
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let win
function createWindow () {
// Create the browser window.