# install useful tools
sudo apt-get update
sudo apt-get install --no-install-recommends -y nano mc git
# prepare /boot
sudo umount /boot/efi
sudo mv /boot /boot.bak
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wpa_supplicant -B -i interface -c <(wpa_passphrase 'SSID' 'key'). | |
ping 1.1.1.1 | |
parted /dev/nvme0n1 -- mklabel gpt | |
parted /dev/nvme0n1 -- mkpart primary 512MiB -0 | |
parted /dev/nvme0n1 -- mkpart ESP fat32 1MiB 512MiB | |
parted /dev/nvme0n1 -- set 2 esp on | |
cryptsetup luksFormat /dev/nvme0n1p1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import re | |
session = requests.Session() | |
# This isn't your Telstra ID but rather the Fon credentials found in the Telstra Air app, you can also find this in the network tab of inspect element when logging in normally. | |
anid = "m61400000000@wifi.telstra.com" | |
anidpassword = "" | |
try: login = re.findall(r'<LoginURL>(.*)</LoginURL>', session.get("http://msftconnecttest.com/redirect").text)[0] # Get the Telstra Air login URL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import re | |
session = requests.Session() | |
# This isn't your Telstra ID but rather the Fon credentials found in the Telstra Air app, you can also find this in the network tab of inspect element when logging in normally. | |
anid = "m61400000000@wifi.telstra.com" | |
anidpassword = "" | |
try: login = re.findall(r'<LoginURL>(.*)</LoginURL>', session.get("http://msftconnecttest.com/redirect").text)[0] # Get the Telstra Air login URL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module TodoMVC where | |
import DSL | |
import Data.Array (filter, head, last) | |
import Data.Array as Array | |
import Data.Foldable (length) | |
import Data.Maybe (Maybe(..)) | |
import Data.Number as Number | |
import Data.String (Pattern(..), split) |
It's very easy for remote working to fail if the company doesn't invest in it. It requires buy-in from the entire company, but the benefits are significant:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Instead of using calls like DateTime.Now, use TheDateTime.Now instead. In your production code it will default to using | |
// the read details and for testing you would make calls like: | |
// TheDateTime.SwitchToMockDate(new DateTime(2018, 12, 3); | |
// and then test what the outcome would be. It assumes that you have this throughout | |
public static class TheDateTime | |
{ | |
static Lazy<LiveDateTimeFunctions> _liveDates = new Lazy<LiveDateTimeFunctions>(() => new LiveDateTimeFunctions()); | |
static Lazy<MockDateTimeFunctions> _mockDates = new Lazy<MockDateTimeFunctions>(() => new MockDateTimeFunctions()); | |
static IDateTimeFunctions _instance = _liveDates.Value; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is pretty trimmed down, but is the basic idea, at least | |
docker ps -a -q -f status=exited | xargs -r docker rm | |
git reset --hard | |
git checkout stage-$1 |
This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.
Install Raspbian Jessie (2016-05-27-raspbian-jessie.img
) to your Pi's sdcard.
Use the Raspberry Pi Configuration tool or sudo raspi-config
to:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Tested with Xamarin.UITest V1.3.7; | |
using System; | |
using Xamarin.UITest; | |
namespace {APPNAMEHERE}.UITests | |
{ | |
/// <summary> | |
/// This extension class extends the <see cref="IApp"/> interface to add extension methods for selecting values from the default Date/Time pickers in iOS and Android. | |
/// </summary> | |
public static class AppPickerExtensions |
NewerOlder