Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
set -eux
hdiutil create -o /tmp/ventura -size 16384m -volname ventura -layout SPUD -fs HFS+J
hdiutil attach /tmp/ventura.dmg -noverify -mountpoint /Volumes/ventura
sudo /Applications/Install\ macOS\ Ventura\.app//Contents/Resources/createinstallmedia --volume /Volumes/vent\
ura --nointeraction
hdiutil eject -force /Volumes/Install\ macOS\ Ventura
hdiutil convert /tmp/ventura.dmg -format UDTO -o ~/Desktop/ventura.cdr
mv ~/Desktop/ventura.cdr ~/Desktop/ventura.iso
export IFS=$'\n';for file in `find . -iname "*.avif"`;do echo "${file} -> ${file%%.avif}.jpg";convert "${file}" "${file%%.avif}.jpg" && /bin/rm -vf "${file}";done
@tknr
tknr / compact_all.sh
Last active January 25, 2022 09:42
do compact all virtualbox hdds
#/bin/bash
## https://www.ringosan.net/?p=258
export IFS=$'\n'
for uuid in `vboxmanage list hdds | grep ^UUID | sed 's/ //g'| cut -d ':' -f 2`
do
echo ${uuid}
vboxmanage modifyhd ${uuid} --compact
done
<#
.SYNOPSIS
exports installed packages.
.DESCRIPTION
exports installed packages:
exportChocolatey.ps1 > packages.config
You can install the packages using :
choco install packages.config -y
.LINK
https://gist.github.com/alimbada/449ddf65b4ef9752eff3
@piouc
piouc / nicovideo-fake-premium.user.js
Last active August 17, 2024 06:31
nicovideo fake premium
// ==UserScript==
// @name nicovideo fake premium
// @namespace https://piou.dev
// @include https://www.nicovideo.jp/watch/*
// @version 1.2.0
// @grant none
// @run-at document-start
// ==/UserScript==
const observer = new MutationObserver((mutations) => {
@Wh0ba
Wh0ba / deb2ipa.sh
Last active November 19, 2024 22:52
#!/usr/bin/env bash
# Made by Wh0ba 2019
# To use this script
# Place it in the packages folder of your theos app project
# and run it by ./deb2ipa.sh
# and choose your .deb file that you want to convert
cd "$(dirname "$0")"
@rexlx
rexlx / HOWTO.md
Created August 1, 2020 17:20
TigerVNC on CentOS 8

What has changed

The previous Tigervnc versions had a wrapper script called vncserver which could be run as a user manually to start Xvnc process. The usage was quite simple as you just run

$ vncserver :x [vncserver options] [Xvnc options]

and that was it. While this was working just fine, there were issues when users wanted to start a Tigervnc server using systemd. For these reasons things were completely changed and there is now a new way how this all is supposed to work.

@viz3
viz3 / tver.py
Last active October 31, 2021 09:31
youtube-dl -o "あとで見る.%(ext)s" "$(./tver.py https://tver.jp/episode/1234567)" https://blog.srytk.com/aquei/555.html
#!/usr/bin/env python3
"""
CC0で公開する https://creativecommons.org/publicdomain/zero/1.0/deed.ja
"""
import re
from urllib.request import urlopen
import argparse
@diplix
diplix / throttle-plex.sh
Created May 18, 2019 07:30
limit plex media server cpu usage on os x
#!/bin/bash
# limit plex media server cpu usage, especially plex transcoder
# on os x (works on el capitan)
#
# prerequisite: install cpulimit
# brew install cpulimit
#
# arguments:
# -l 100 limits plex cpu usage to around 30-40 % on a mac mini
# running lots of other processen