Skip to content

Instantly share code, notes, and snippets.

View ichisadashioko's full-sized avatar

shioko ichisadashioko

View GitHub Profile
@ichisadashioko
ichisadashioko / download_html_page.js
Created April 4, 2023 20:40
download current rendered html page for processing later
let current_time = new Date();
let year_str = current_time.getUTCFullYear().toString();
while (year_str.length < 4) { year_str = '0' + year_str; }
let month_str = (current_time.getUTCMonth() + 1).toString();
while (month_str.length < 2) { month_str = '0' + month_str; }
let day_str = current_time.getUTCDate().toString();
while (day_str.length < 2) { day_str = '0' + day_str; }
let hour_str = current_time.getUTCHours().toString();
while (hour_str.length < 2) { hour_str = '0' + hour_str; }
let minute_str = current_time.getUTCMinutes().toString();
@ichisadashioko
ichisadashioko / make_obj_pickle_friendly.py
Created February 10, 2023 15:24
make object pickle friendly
def make_obj_pickle_friendly(obj):
try:
pickle.dumps(obj)
return obj
except Exception:
if isinstance(obj, dict):
return {
key: make_obj_pickle_friendly(value)
for key, value in obj.items()
}
@ichisadashioko
ichisadashioko / set_background_color.sh
Created August 8, 2022 16:44
set ubuntu desktop background to solid color
gsettings set org.gnome.desktop.background picture-uri ""
gsettings set org.gnome.desktop.background primary-color '#000000'
@ichisadashioko
ichisadashioko / restore_windows_capture_folder_location.bat
Created June 25, 2022 07:50
restore windows game dvr capture location
taskkill /f /im explorer.exe
timeout /t 2 /nobreak >nul
if not exist "%UserProfile%\Videos\Captures" mkdir "%UserProfile%\Videos\Captures"
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "{EDC0FE71-98D8-4F4A-B920-C8DC133CB165}" /t REG_EXPAND_SZ /d %%USERPROFILE%%"\Videos\Captures" /f
attrib +r -s -h "%USERPROFILE%\Videos\Captures" /S /D
@ichisadashioko
ichisadashioko / gnome-screenshot.sh
Last active July 6, 2021 12:03
gnome-screenshot
#!/bin/bash
# mv /usr/bin/gnome-screenshot /usr/bin/gnome-screenshot.real
# chmod +x /usr/bin/gnome-screenshot
mkdir -p "$HOME/Pictures/Screenshots"
gnome-screenshot.real -f "$HOME/Pictures/Screenshots/$(date --utc +%Y%m%d_%k%M%S_%N).png" $@
@ichisadashioko
ichisadashioko / note.md
Created June 30, 2021 04:08
vmware cheat sheet

change boot wait delay

bios.bootdelay = X

disable synchronizing time

  • To disable periodic time synchronization in a VM, launch vSphere Client, go to Edit Settings → VM Options → VMware Tools → Time, and deselect the checkbox Synchronize guest time with host
@ichisadashioko
ichisadashioko / selector.txt
Created June 29, 2021 14:45
ublock origin selector to block google search local results
##div:has(>div>div>div>h2:has-text(Local Results))
@ichisadashioko
ichisadashioko / style.css
Created June 26, 2021 04:54
stylus styling for annoying JP sites
* {
background-image: none !important;
background-color:black !important;
color: white !important;
}
a {
color: rgb(0, 255, 0) !important;
}
@ichisadashioko
ichisadashioko / disable_chrome_auto_updates.reg
Created June 11, 2021 02:05
disable chrome automatic updates windows
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update]
"AutoUpdateCheckPeriodMinutes"=dword:00000000
@ichisadashioko
ichisadashioko / restore_windows_photo_viewer.reg
Created June 11, 2021 02:04
restore windows photo viewer
Windows Registry Editor Version 5.00
; Created by: Shawn Brink
; Created on: August 8th 2015
; Updated on: August 5th 2018
; Tutorial: https://www.tenforums.com/tutorials/14312-restore-windows-photo-viewer-windows-10-a.html
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open]
"MuiVerb"="@photoviewer.dll,-3043"