Skip to content

Instantly share code, notes, and snippets.

View typelogic's full-sized avatar
🏹

typelogic typelogic

🏹
View GitHub Profile
@typelogic
typelogic / ubuntu-run-dhclient-on-startup.md
Created February 11, 2019 09:24 — forked from mohamadaliakbari/ubuntu-run-dhclient-on-startup.md
Run dhclient on Startup in Ubuntu 18.04

dhclient is the Dynamic Host Configuration Protocol (DHCP) Client one would use to allow a client to connect to a DHCP server.

$ sudo nano /etc/rc.local

#!/bin/bash
dhclient
exit 0

$ sudo chmod 755 /etc/rc.local

@typelogic
typelogic / gist:3c14a1c0b03515337b129c6b6fcddf08
Created February 11, 2019 12:12
ubuntu 18.04 netplan networking
https://websiteforstudents.com/configure-static-ip-addresses-on-ubuntu-18-04-beta/
@typelogic
typelogic / ubuntu18.04
Created February 11, 2019 12:32
ubuntu 18.04 cloud-init networking
[instead of /etc/network/interfaces]
/etc/netplan/*.yml
[IPV4 daemon]
systemctl status isc-dhcp-server.service
dpkg -l cloud-init
[install dhcp server]
apt-get install -y isc-dhcp-server
```yml
https://www.easycryptomining.com/diskless_mining_node.html
@typelogic
typelogic / netshare
Created February 11, 2019 15:18
dos create drive j of shared folder
net use j: \\winsvr\public p4ssw0rd /user:xa185321
@typelogic
typelogic / dhcp.tips
Created February 12, 2019 15:03
dhcp dnsmasq experiments
[a successfull dhcp offer and client uses the ip address]
Feb 13 06:45:29 keyholder systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.
Feb 13 06:47:08 keyholder dnsmasq-dhcp[1880]: DHCPDISCOVER(eth0) 192.168.10.2 b8:27:eb:c3:94:98
Feb 13 06:47:08 keyholder dnsmasq-dhcp[1880]: DHCPOFFER(eth0) 192.168.13.13 b8:27:eb:c3:94:98
Feb 13 06:47:08 keyholder dnsmasq-dhcp[1880]: DHCPREQUEST(eth0) 192.168.13.13 b8:27:eb:c3:94:98
Feb 13 06:47:08 keyholder dnsmasq-dhcp[1880]: DHCPACK(eth0) 192.168.13.13 b8:27:eb:c3:94:98 sysbox
Feb 13 06:55:06 keyholder dnsmasq-dhcp[1880]: DHCPDISCOVER(eth0) 192.168.13.13 b8:27:eb:c3:94:98 <-- when rpi is rebooted
[an unsuccesfull dhcp offer and client is not using it]
Feb 13 06:36:49 keyholder systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.
@typelogic
typelogic / gist:fd07b416d0cbdb01baa844b780e678cf
Created February 12, 2019 16:35
dnsmasq setting set ipaddr per macaddr
dhcp-host=08:00:27:b2:cf:50,192.168.143.69
@typelogic
typelogic / vbox
Created February 13, 2019 09:51
virtualbox networking
VBoxManage.exe dhcpserver remove --netname "HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #3"
VBoxManage.exe list dhcpservers
@typelogic
typelogic / asciinema.howto
Created February 13, 2019 15:25
asciinema setup
# setup asciinema-server inside VM via docker
# Configured values in .env.production file
```
## Base URL of your asciinema web app instance
URL_SCHEME=http
URL_HOST=<ip of vm here>
URL_PORT=80
## Base secret key for signing cookies etc.
@typelogic
typelogic / runproxy.sh
Created February 13, 2019 16:47
both private key and script logic in one script file
#!/bin/sh
#
# Transform to base64 one-liner and hardcode assigned to variable x
# cat id_rsa | base64 -w0 > /tmp/x
trap cleanup 1 2 3 6
cleanup () {
rm -f $t
}