Skip to content

Instantly share code, notes, and snippets.

View phuchptty's full-sized avatar
💀
Dead Inside

Lucas Dang phuchptty

💀
Dead Inside
View GitHub Profile
@phuchptty
phuchptty / cf-ddns.sh
Created April 4, 2020 13:02 — forked from larrybolt/cf-ddns.sh
Automatically update your CloudFlare DNS record to the IP, Dynamic DNS for Cloudflare
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
# Automatically update your CloudFlare DNS record to the IP, Dynamic DNS
# Can retrieve cloudflare Domain id and list zone's, because, lazy
# Place at:
# /usr/local/bin/cf-ddns.sh
@phuchptty
phuchptty / keybase.md
Last active September 11, 2019 04:58

Keybase proof

I hereby claim:

  • I am phuchptty on github.
  • I am phuchptty (https://keybase.io/phuchptty) on keybase.
  • I have a public key ASBOX1LlA_CDCpVP_MVeHIS2Y2vR2lzs6dDQcb_NRYFSkAo

To claim this, I am signing this object:

@phuchptty
phuchptty / wifi-on-ubuntu-server-18.md
Created December 18, 2018 11:06 — forked from austinjp/wifi-on-ubuntu-server-18.md
Enabling wifi on Ubuntu server 18

Wifi on Ubuntu 18 server

TLDR

  1. Install wpasupplicant
  2. Turn on wifi radios: sudo nmcli radio wifi on
  3. Check your devices are recognised even if they're not "managed": sudo iwconfig
  4. Check your wifi (here called "wlp3s0") is capable of detecting nearby routers: sudo iwlist wlp3s0 scan
  5. Configure netplan by dropping a file called 01-netcfg.yml into /etc/netplan/ or edit existing file there. See example below.
  6. netplan try, netplan generate, netplan apply.
@phuchptty
phuchptty / hassio_ubuntu_install_commands.sh
Created December 16, 2018 18:58 — forked from frenck/hassio_ubuntu_install_commands.sh
Simple install command for installing Hass.io on a Generic Ubuntu/Debian machine
sudo -i
add-apt-repository universe
apt-get update
apt-get install -y apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq network-manager socat software-properties-common
curl -sSL https://get.docker.com | sh
curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-build/master/install/hassio_install" | bash -s
@phuchptty
phuchptty / stream_to_youtube.sh
Created July 9, 2017 06:54 — forked from olasd/stream_to_youtube.sh
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube