Skip to content

Instantly share code, notes, and snippets.

View jonchampagne's full-sized avatar

Jon Champagne jonchampagne

  • Waterloo, Ontario, Canada
View GitHub Profile
@TimJDFletcher
TimJDFletcher / ssh-keygen.service
Created May 13, 2017 15:54
Systemd unit to generate missing ssh keys on boot
[Unit]
Description=Generate sshd keys
Before=ssh.server
[Service]
Type=oneshot
ExecStart=/usr/bin/ssh-keygen -A
RemainAfterExit=true
StandardOutput=journal
@alwerner
alwerner / retroactively add items to .gitignore
Last active March 21, 2022 23:14
retroactively add items to .gitignore
// make change to .gitignore
git rm --cached <filename>
// or, for all files
git rm -r --cached .
git add .
// then
@aruld
aruld / foreachlistset.dart
Created October 19, 2011 18:30
Dart forEach() on a List/Set
main() {
List<String> list = new List<String>();
list.add('one');
list.add('two');
list.add('twelve');
list.forEach((element) => print(element));
Set<String> set = Set.from(list);
set.forEach((element) => print(element));
}