Skip to content

Instantly share code, notes, and snippets.

View lamlion's full-sized avatar
🎯
Focusing

Feisal Lam-Lion lamlion

🎯
Focusing
View GitHub Profile
@lamlion
lamlion / docker_commands.txt
Last active April 12, 2018 22:10
Useful single docker commands
Install Docker on ARM:
https://docs.docker.com/install/linux/docker-ce/debian/
Compile docker-compose on ARM:
$ git clone https://github.com/docker/compose.git
$ cd compose
$ git checkout release
$ docker build -t docker-compose:armhf -f Dockerfile.armhf .
$ docker run --rm --entrypoint="script/build/linux-entrypoint" -v $(pwd)/dist:/code/dist -v $(pwd)/.git:/code/.git "docker-compose:armhf"
@lamlion
lamlion / domoticz_docker.sh
Created January 27, 2018 13:37
Domoticz Docker startup script
docker run --name=domoticz --privileged --cidfile="cid" -d -p 8080:8080 -t joshuacox/mkdomoticz:arm
mkdir -p domoticz-data
docker cp `cat cid`:/config - |sudo tar -C domoticz-data/ -pxf -
# kill container and recreate with volume
@lamlion
lamlion / make_image_dd.txt
Last active January 10, 2018 13:13
Make and extract an image using dd
sudo dd if=/dev/rdisk1 bs=1m | gzip > ~/Desktop/pi.gz
gzip -dc ~/Desktop/pi.gz | sudo dd of=/dev/rdisk1 bs=1m
@lamlion
lamlion / highsierra_bootable.sh
Last active August 4, 2018 08:06 — forked from agentsim/highsierra_bootable.sh
Create bootable ISO from HighSierra Installer
# Generate a BaseSystem.dmg with 10.13.3 Install Packages
hdiutil attach /Applications/Install\ macOS\ High\ Sierra.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\ High\ Sierra.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages
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