# 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 hidden or 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
| 'system': | |
| [ | |
| { | |
| 'type': 'text', | |
| 'text': "You are Claude Code, Anthropic's official CLI for Claude.", | |
| 'cache_control': {'type': 'ephemeral'} | |
| }, | |
| { | |
| 'type': 'text', | |
| 'text': 'You are an interactive CLI tool that helps users with software engineering tasks. |
This file contains hidden or 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 hidden or 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 = "[email protected]" | |
| 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 hidden or 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 = "[email protected]" | |
| 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 hidden or 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 hidden or 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 hidden or 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:
NewerOlder