Skip to content

Instantly share code, notes, and snippets.

View dajo's full-sized avatar

Jason Lachowsky dajo

View GitHub Profile
@DustinWehr
DustinWehr / beeftext_to_espanso.js
Created March 4, 2021 19:20
Beeftext snippets to Espanso snippets
/*
1. Replace my snippets json with yours.
2. Copy paste this whole file into your browser console.
*/
beeftext_json = {
"combos": [
{
"creationDateTime": "2019-01-25T11:23:30.000",
"enabled": true,

WSL 2 Cisco AnyConnect Networking Workaround

Overview

WSL 2 uses a Hyper-V Virtual Network adapter. Network connectivity works without any issue when a VPN is not in use. However when a Cisco AnyConnect VPN session is established Firewall Rules and Routes are added which breaks connectivity within the WSL 2 VM. This issue is tracked WSL/issues/4277

Below outline steps to automatically configure the Interface metric on VPN connect and update DNS settings (/etc/resolv.conf) on connect/disconnect.

Manual Configuration

Set Interface Metrics

@deargle
deargle / client.conf
Last active June 1, 2024 12:32
OpenVPN server.conf and client.conf
##############################################
# Sample client-side OpenVPN 2.0 config file #
# for connecting to multi-client server. #
# #
# This configuration can be used by multiple #
# clients, however each client should have #
# its own cert and key files. #
# #
# On Windows, you might want to rename this #
# file so it has a .ovpn extension #
@paveleremin
paveleremin / Cisco.vbs
Created February 24, 2017 06:45
Cisco AnyConnect: save password
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run """%PROGRAMFILES(x86)%\Cisco\Cisco AnyConnect Secure Mobility Client\vpnui.exe"""
WScript.Sleep 1500
WshShell.AppActivate "Cisco AnyConnect Secure Mobility Client"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
@jacobsalmela
jacobsalmela / requestMedicalRecords.py
Created June 3, 2016 14:10
Template script to quickly fill out PDFs
#!/usr/bin/env python
# Jacob Salmela
# 2016-06-02
# Writes text to a PDF at coordinates. Use for quickly filling out forms that you use regularly.
# This takes some manual setup, but saves a ton of time once done
# http://stackoverflow.com/a/17538003
# Make sure to install the two utilities below first
# sudo easy_install pyPdf
# sudo easy_install reportlab
@Hexalon
Hexalon / Imaging-Win10.ps1
Last active August 17, 2017 18:05
Provides interactive/automated imaging operations using DISM and WinPE
#requires -version 4.0
#requires -modules Storage,DISM
#Requires -RunAsAdministrator
<#
.NOTES
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2016 v5.2.117
Created on: 3/16/2016 10:05
Created by: Colin Squier <hexalon@gmail.com>
Filename: Imaging-Win10.ps1
@dieseltravis
dieseltravis / PS-BGInfo.ps1
Last active April 23, 2024 15:16
update wallpaper background image with powershell (like Sysinternals BGInfo)
# PS-BGInfo
# Powershell script that updates the background image with a random image from a folder and writes out system info text to it.
# run as a lower priority task
[System.Threading.Thread]::CurrentThread.Priority = 'BelowNormal'
# Configuration:
# Font Family name
$font="Input"
@meitinger
meitinger / UpdatesDownloader.cs
Last active April 1, 2016 21:38
Utility that downloads all approved Windows 7 updates from WSUS that can be used with DISM.
/* Copyright (C) 2015, Manuel Meitinger
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@devhawk
devhawk / Invoker.ps1
Last active August 28, 2016 02:01
Boxstarter Configuration
function Run-Boxstarter-From-Gist($gistId, $fileName) {
Invoke-WebRequest "https://api.github.com/gists/$gistId" -UseBasicParsing | ConvertFrom-Json | %{
$local:boxstarterUrl = "http://boxstarter.org/package/url?$($_.files.$fileName.raw_url)"
& 'C:\Program Files\Internet Explorer\iexplore.exe' -new $local:boxstarterUrl
}
}
Run-Boxstarter-From-Gist d5e9d66238717bab0e23 basicconfig.ps1
Run-Boxstarter-From-Gist d5e9d66238717bab0e23 devcconfig.ps1
@mgrandi
mgrandi / rename-file-to-parent-folder.py
Last active June 14, 2017 16:00
rename a file based on the name of the parent directory
#
# script to rename files to the same name as the parent folder
#
# so
#
# 3a -|
# - 3a1c603a -|
# - resident_sound.dat (gets renamed to be 3a1c603a_resident_sound.dat)
#
#