Skip to content

Instantly share code, notes, and snippets.

View phamduchongan93's full-sized avatar
🏠

AnPham phamduchongan93

🏠
View GitHub Profile
@phamduchongan93
phamduchongan93 / index.html
Created October 21, 2020 11:45
Music Player
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Music Player</title>
</head>
<body>
@phamduchongan93
phamduchongan93 / Working autorunonce file
Last active February 14, 2020 08:50
Treehosues autorunonce
#!/bin/bash
treehouses rename pinode1
# expands the filesystem
treehouses expandfs
treehouses bluetooth on
# set up the default ip
# treehouses staticwifi <ip> <mask> <gateway> <dns> <ESSID> [password]
treehouses staticwifi 192.168.0.10 255.255.255.0 192.168.0.1 8.8.8.8 NETGEAR11 blueteapot615
# treehouses wifi NETGEAR11 blueteapot615
@phamduchongan93
phamduchongan93 / vagrant bug
Created January 7, 2020 20:05
incompatible with vagrant libvirt
INFO global: Vagrant version: 2.2.6
INFO global: Ruby version: 2.4.9
INFO global: RubyGems version: 2.6.14.4
INFO global: VAGRANT_DEFAULT_PROVIDER="libvirt"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/bin/vagrant"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
INFO global: VAGRANT_LOG="debug"
WARN global: resolv replacement has not been enabled!
sudo screen /dev/ttyUSB0 115200
https://raw.githack.com/treehouses/treehouses.github.io/serial_cable/
@phamduchongan93
phamduchongan93 / [config] i3 audio config
Last active December 12, 2019 15:47
i3 config file for i3wm
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
```
pi@treehouses:~ $ treehouses version
1.10.7
pi@treehouses:~ $ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 0.0.0.0 0.0.0.0 U 206 0 0 br-c8ee21a7dc8f
link-local 0.0.0.0 255.255.0.0 U 206 0 0 br-c8ee21a7dc8f
@phamduchongan93
phamduchongan93 / trash_can_for_bash.sh
Last active November 5, 2019 01:07
Update rm command for linux
function move_to_trash () {
# check if you have the backup directory.
if [ -d "/home/`whoami`/backup/" ]; then
mkdir -p "/home/`whoami`/backup/";
fi
# copy the files or folders before deleting it.
cp -r "$@" "/home/`whoami`/backup/" && command rm -rf "$@" && echo "Moved to trash";