Skip to content

Instantly share code, notes, and snippets.

View sonhanguyen's full-sized avatar

Harry sonhanguyen

  • Melbourne, Australia
View GitHub Profile
@Chuxel
Chuxel / fix-bind-mount.sh
Last active October 14, 2020 17:32
Script to ensure using "docker -v" from the workspace folder functions in Codespaces
#!/bin/bash
if [ "${CODESPACES}" != "true" ]; then
echo 'Not in a codespace. Aborting.'
exit 0
fi
WORKSPACE_PATH_IN_CONTAINER=${1:-"$HOME/workspace"}
WORKSPACE_PATH_ON_HOST=${1:-"/var/lib/docker/vsonlinemount/workspace"}
VM_CONTAINER_WORKSPACE_PATH=/vm-host/$WORKSPACE_PATH_IN_CONTAINER
VM_CONTAINER_WORKSPACE_BASE_FOLDER=$(dirname $VM_CONTAINER_WORKSPACE_PATH)
@psammarco
psammarco / BuildMe AlpineLinux chroot env aarch64
Last active June 13, 2023 18:32
Build AlpineLinux 3.7 aarch64 for the RaspberryPi 3
# The following steps will show you how to deploy a AlpineLinux 3.7 aarch64 for the RaspberryPi 3 from a chrooted environment.
#
# This image was built using a Gentoo aarch64 HOST.
#
# Steps for building the kernel are not provided in this guide.
#
# However I have used this wiki page as guidance to build mine https://wiki.gentoo.org/wiki/Raspberry_Pi_3_64_bit_Install .
#
# I am sure you will find lots of weirdness here along with many things that can be improved.
#
@agentsim
agentsim / highsierra_bootable.sh
Created June 10, 2017 02:23
Create bootable ISO from HighSierra Installer
# Generate a BaseSystem.dmg with 10.13 Install Packages
hdiutil attach /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/highsierra
hdiutil create -o /tmp/HighSierraBase.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierraBase.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation
hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil detach /Volumes/highsierra/
mv /tmp/HighSierraBase.cdr.dmg /tmp/BaseSystem.dmg
@ruario
ruario / standalone-vivaldi-mac.md
Last active December 13, 2024 20:48
A small App that starts Vivaldi for Mac in such a way that it will store its profile within a subfolder (Useful for testing)

Vivaldi "Standalone Mode" on Mac

The following commands will produce a small application that allows you to run Vivaldi—or any other Chromium-based browser—in Standalone mode on a Mac. This could be used for testing a specific setup or version, without touching the system wide settings (profile). It can also be used to create a portable (USB install) of Vivaldi that you could store on an external disk, for sharing between computers.

Manual method

Start Terminal and issue the following:

mkdir -p Standalone\ Mode.app/Contents/MacOS
@ruario
ruario / standalone-vivaldi.md
Last active April 16, 2024 01:54
Unpacks a Vivaldi Linux browser package into a version named directory and creates a startup script that will cause it to save its profile within this directory—Useful for testing or standalone (portable) installs.

Disclaimer: I wrote this script for my own personal use. Completely unofficial and unsupported by Vivaldi Technologies. However, others are welcome to use it at their own risk.

This script converts a Vivaldi browser Linux package into standalone, self-contained install. It lets you use the rpm and deb packages in a similar way to how people generally used the old Opera (Presto) tar packages—for quick testing, without committing to a full, system-wide install. This could be used for testing a specific setup or version, without touching the system wide settings (profile). It can also be used to create a portable (USB install) of Vivaldi that you could store on an external disk, for sharing between computers. A script that supports integration with the desktop environment is also provided.

Usage example:

sh standalone-vivaldi.sh vivaldi-snapshot-1.7.702.1-1.x86_64.rpm

When the script is done you will have a suitably version named directory.