Skip to content

Instantly share code, notes, and snippets.

@thales17
thales17 / DisableWifiPowerSave.md
Created September 19, 2017 15:10
Disable Wifi Power Save on Raspbian

Disable WIFI Power Save on Raspbian Jessie

  • Use iw wlan0 get power_save to see if the wifi power save feature is enabled or not
  • If you want to permantently disable it add this to the /etc/network/interfaces after the iface wlan0 line wireless-power off
  • Reboot and if you run iw wlan0 get power_save you should see that is off.
@thales17
thales17 / index.html
Created August 1, 2017 19:44
Prettify structured logs in the browser
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div>
<p id="logs" class="log"></p>
</div>
@thales17
thales17 / docker_cheatsheet.md
Last active July 26, 2017 14:20
Docker Cheat Sheet

Attach to running Container:

docker attach MY_CONTAINER

Detach from Container:

ctrl+pq

List All Containers:

docker ps -q Use -q to only list their IDs

List Containers that use an Image:

@thales17
thales17 / findip.sh
Last active July 25, 2017 18:11
Bash find ip with timeout
#!/bin/bash
TIMEOUTSEC=10
function findIP {
startTime=$(date +%s)
ip=$(ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1')
iplen=${#ip}
elapsedTime=$(( $(date +%s) - startTime ))
echo "Checking for IPv4 address..."