Skip to content

Instantly share code, notes, and snippets.

View JavaScriptDude's full-sized avatar

Timothy C. Quinn JavaScriptDude

  • Ontario, Canada
View GitHub Profile
@objectcraftworks
objectcraftworks / kill_iisexpress
Created July 19, 2013 16:41
Powershell script to kill IISExpress and worker processes
get-process | where { $_.name -match "WebDev" -or $_.name -match "IISExpress" } | kill
@2E0PGS
2E0PGS / linux-usb-file-copy-fix.md
Last active May 11, 2024 06:48
Fix Ubuntu and other Linux slow/hanging file copying via USB.

If your running a x64 bit Ubuntu or other Linux and find USB transfers hang at the end apply this fix:

echo $((16*1024*1024)) > /proc/sys/vm/dirty_background_bytes
echo $((48*1024*1024)) > /proc/sys/vm/dirty_bytes

I suggest you edit your /etc/rc.local file to make this change persistant across reboots.

sudo nano /etc/rc.local

@CMCDragonkai
CMCDragonkai / exporting_modules_functions_from_python_init.md
Last active July 15, 2024 09:44
Exporting Modules and Functions from Python `__init__.py` #python

Exporting Modules and Functions from Python __init__.py

Any directory with __init__.py is considered a package in Python.

Any python files inside a package is considered a module.

Modules contain functions and other bindings that is always exported.

If you are outside the package, and you want to import a module from a package:

@vrivellino
vrivellino / install-ubuntu.sh
Last active February 2, 2021 13:37
Install Ubuntu 18.04: ZFS on encrypted drives with USB boot disk
#!/usr/bin/env bash
# Adapted from https://github.com/zfsonlinux/zfs/wiki/Ubuntu-18.04-Root-on-ZFS
# Should be executed from a live CD environment
set -e
## CONFIG VARS
set -x
# Disk drive ids (symlinks in /dev/disk/by-id)
bootdisk='usb-SanDisk_Cruzer_AAAAAAAAAAAAAAAAAAAA-0:0'
rdisk1='ata-SanDisk_SDSSDHII120G_AAAAAAAAAAAA'
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active July 18, 2024 22:51
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@JavaScriptDude
JavaScriptDude / Libreoffice_Python_scripting.md
Last active December 14, 2020 04:14
Editing xls spreadsheet from Python

Installation

Linux package

sudo apt-get install python3-uno

Add python3 dist-packages to PYTHONPATH:

% dpkg-query -L python3-uno | grep dist

Add Dist Packages to PYTHONPATH in ~/.bashrc

Change this path as required % export PYTHONPATH=/usr/lib/python3/dist-packages

@Braytiner
Braytiner / Windows Defender Exclusions VS 2022.ps1
Last active June 21, 2024 13:29
Adds Windows Defender exclusions for Visual Studio 2022
$userPath = $env:USERPROFILE
$pathExclusions = New-Object System.Collections.ArrayList
$processExclusions = New-Object System.Collections.ArrayList
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null
$pathExclusions.Add('C:\Windows\assembly') > $null
$pathExclusions.Add($userPath + '\Downloads\HeidiSQL_11.3_64_Portable') > $null
$pathExclusions.Add($userPath + '\.dotnet') > $null
@JavaScriptDude
JavaScriptDude / Linux With ZFS Root on Mint
Last active February 14, 2024 20:13
Linux Mint 21.1 ZFS Root Installation Notes
When installing Linux Mint, you can install with ZFS Root by following standard instructions.
However, there is an issue with almost all Linux distributions default ZFS install script where the
allocated spaces for the partitions are a bit too small for real world ZFS Use.
These instructions show how to alter the ZFS setup script to have a more appropriate partition spacing.
Boot into the Linux Mint OS USB stick, and:
```
sudo su
cd /usr/share/ubiquity/