Skip to content

Instantly share code, notes, and snippets.

View jhillyerd's full-sized avatar

James Hillyerd jhillyerd

View GitHub Profile
@jpetazzo
jpetazzo / gist:6127116
Created July 31, 2013 23:21
Debian/Ubuntu containers protips, thanks to @spahl
# this forces dpkg not to call sync() after package extraction and speeds up install
RUN echo "force-unsafe-io" > /etc/dpkg/dpkg.cfg.d/02apt-speedup
# we don't need and apt cache in a container
RUN echo "Acquire::http {No-Cache=True;};" > /etc/apt/apt.conf.d/no-cache
@damieng
damieng / WinDev.ps1
Last active March 4, 2020 19:09
Make Windows more developer-workstation oriented (includes removing crapware)
# Run this from Powershell as Administrator with (New-Object System.Net.WebClient).DownloadString("https://gist.github.com/damieng/881852e7112be7d97957/raw") | powershell -command -
Write-Output "Making Windows more developer oriented (Revision 26)..."
Set-ExecutionPolicy Unrestricted
if ([System.Environment]::OSVersion.Version.Major -ge 10) {
Write-Output " * Detected Windows 10"
Write-Output " * Removing Windows 10 bloatware"
$apps = @(
"Microsoft.3DBuilder"
@mosquito
mosquito / README.md
Last active July 24, 2024 14:40
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@dyrkin
dyrkin / wire_transfer.go
Last active June 28, 2021 13:37
Decomposed WireTransfer FSM definition
func whenInitial(wt *fsm.FSM) fsm.StateFunction {
return func(event *fsm.Event) *fsm.NextState {
transfer, transferOk := event.Message.(*Transfer)
if transferOk && event.Data == nil {
transfer.source <- transfer.amount
return wt.Goto(AwaitFromState).With(
&WireTransferData{transfer.source, transfer.target, transfer.amount, wt},
)
}
return wt.DefaultHandler()(event)