Skip to content

Instantly share code, notes, and snippets.

View pagkly's full-sized avatar

pagkly

  • Human
  • Earth
View GitHub Profile
@sebnilsson
sebnilsson / ConvertWordsToPdfs.cls
Last active August 22, 2020 03:48
VBA: Loop through all files in a directory and convert them to PDF-files
Sub ConvertWordsToPdfs()
Dim directory As String
directory = "C:\Wordup" ' The starting directory
Dim fso, folder, files
Set fso = CreateObject("Scripting.FileSystemObject")
Set folder = fso.GetFolder(directory)
Set files = folder.files
@nilbus
nilbus / mosh-cygwin.md
Last active March 19, 2021 09:10
Getting mosh (mobile-shell) working with cygwin

Getting mosh on cygwin to work was a little challenging, so I want to share how I got it.

First, install mosh on the server and the client (with cygwin's setup.exe)

When I tried to connect to a mosh server from a cygwin terminal

mosh my-server.com

I would get these errors:

@TylerFisher
TylerFisher / hosting-on-github.md
Last active August 5, 2025 12:58
Basic steps for hosting on Github

Hey there, apparently people are still using this Gist from 2013! It's out of date! Consult the Github docs.

Steps for Hosting a Website on GitHub

  1. Create a GitHub account on github.com.
  2. Download either [GitHub for Mac][1] or [GitHub for Windows][2], depending on your operating system. Open the app and log in using the account you just created.
  3. (On Mac): After you login, click advanced and make sure that your name and email are correct. Then, click "Install Command Line Tools", just in case you want to start using the command line later in life.
  4. Create a new repository in your GitHub application. Name it your-username.github.io. The name is very important. Note the folder that GitHub is saving the repository to. Make sure the "Push to GitHub?" box is checked.
  5. Move your website's files into the folder that GitHub just created when you made the repository. IMPORTANT: Your homepage HTML file must be called "index.html", and it must exist in the top-level
<#
install chocolatey, install boxstarter
Install-BoxstarterPackage -PackageName http://boxstarter.org/package/url?https://gist.githubusercontent.com/WaltRitscher/8638cd8711650c0bae14/raw/e6706be49f3285bc8eaa2b8f9a0e311e7dd80774/BoxStarterScript
#>
Set-ExplorerOptions -showHidenFilesFoldersDrives -showFileExtensions
Enable-RemoteDesktop
Install-WindowsUpdate -acceptEula
@satreix
satreix / custom_archlinux_live_USB.md
Last active July 12, 2025 21:44
Custom Arch Linux live USB

Custom Arch Linux live USB

Setup

Install the dependencies for the archiso package:

(root): pacman -S make squashfs-tools libisoburn dosfstools patch lynx devtools git

I recommend archiso getting them from git, there is a package in the repositories, however, at this time of writing, it will not work with the instructions below. So, grab the most recent version from git and install it:

(user): git clone git://projects.archlinux.org/archiso.git && cd archiso

@kathrinrin
kathrinrin / gist:e81ad6c5963f75c6e198
Created March 11, 2016 16:32
decrypt whatsapp database
1) extract key
https://github.com/AbinashBishoyi/WhatsApp-Key-DB-Extractor-UnOfficial
2) run a few commands
hexdump -e '2/1 "%02x"' whatsapp.key | cut -b 253-316 > aes.txt
hexdump -n 67 -e '2/1 "%02x"' msgstore.db.crypt8 | cut -b 103-134 > iv.txt
dd if=msgstore.db.crypt8 of=msgstore.db.crypt8.nohdr ibs=67 skip=1
openssl enc -aes-256-cbc -d -nosalt -nopad -bufsize 16384 -in msgstore.db.crypt8.nohdr -K $(cat aes.txt) -iv $(cat iv.txt) > msgstore.gz
gzip -cdq msgstore.gz > msgstore.db
@aplocher
aplocher / FixStoreApps.ps1
Last active May 28, 2023 00:32
Fix for Remove-AppxPackage error "HRESULT: 0x80073CFA, Removal failed The system cannot find the file specified.". Requires psexec to be installed
param (
[switch]$Relaunched = $false
)
$ScriptPath = (Get-Variable MyInvocation).Value.MyCommand.Path
function StartOperation {
Write-Host
Write-Host Now attempting to regenerate missing manifest files...
Write-Host
@fdophin
fdophin / macvdr.sh
Last active September 26, 2022 15:59
Bash script to Find MAC Address Vendors.
#!/bin/bash
color=`seq 2 255 | sort -R | head -n 1`
if [ $# != 1 ];
then
echo -e " usage: $0 <MAC addres> \n format: \n 00-11-22-33-44-55 \n 00-11-22-33-44-55 \n 00:11:22:33:44:55 \n 00.11.22.33.44.55 \n 001122334455 \n 0011.2233.4455"
exit 0
fi
GET_VDR=`curl -s http://api.macvendors.com/$1`
@pylover
pylover / a2dp.py
Last active July 21, 2025 21:07
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04, 16.10 and also debian jessie, with bluez5.
#! /usr/bin/env python3
"""Fixing bluetooth stereo headphone/headset problem in debian distros.
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone.
This will be only fixes the bluez5 problem mentioned above .
Licence: Freeware
@intrd
intrd / tutorial_kali_autologin_afterupdate.txt
Last active January 28, 2024 06:32
Kali light xfce4 root autologin (works after lightdm update)
## Kali light xfce4 root autologin (works after lightdm update)
# @author intrd - http://dann.com.br/
# @license Creative Commons Attribution-ShareAlike 4.0 International License - http://creativecommons.org/licenses/by-sa/4.0/
Root autologin is broken after lighdtdm update, fix by doing this:
nano /etc/lightdm/lightdm.conf
at [Seat:*] group uncomment/edit:
autologin-user=root
autologin-user-timeout=0