Skip to content

Instantly share code, notes, and snippets.

View fud's full-sized avatar

Brenton Bills fud

  • Paypa Plane
  • Brisbane, Australia.
  • 07:41 (UTC +10:00)
View GitHub Profile
{
outputs = {
self,
nixpkgs,
}: {
nixosModules.base = {pkgs, ...}: {
system.stateVersion = "22.05";
# Configure networking
networking.useDHCP = false;
@fud
fud / flake.nix
Created March 8, 2022 02:07
Simple Flake
{
inputs = {
nixpkgs = {
url = "github:nixos/nixpkgs/nixos-unstable";
};
flake-utils = {
url = "github:numtide/flake-utils";
};
};
outputs = { nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system:
@fud
fud / README
Created February 18, 2022 06:18 — forked from jmatsushita/README
Setup nix, nix-darwin and home-manager from scratch on an M1 Macbook Pro
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs).
# So here's a minimal Gist which worked for me as an install on a new M1 Pro.
# Inspired by https://github.com/malob/nixpkgs I highly recommend looking at malob's repo for a more thorough configuration
#
# Let's get started
#
# Let's install nix (at the time of writing this is version 2.5.1
curl -L https://nixos.org/nix/install | sh
# I might not have needed to, but I rebooted
@fud
fud / remove.ps1
Created April 7, 2020 22:01
Remove Windows Bloatware
iex ((New-Object System.Net.WebClient).DownloadString('https://git.io/debloat'))
first_number=input('enter the first number ');
second_number=input('enter the second number ');
print(float(first_number) + float(second_number));
@fud
fud / document.html
Created December 11, 2019 03:22
Canvas: text left of canvas as a label
<Row className="timeline-canvas-row">
<Col>
<canvas
id="timeline-canvas"
ref={this.chartRef}
>
</canvas>
<div className="results">
Results
</div>
@fud
fud / gist:a242b2f619e69ee49d63a0a52041903a
Created October 4, 2019 00:24
Remove local branches not on the origin
git remote prune origin
@fud
fud / launch.json
Created October 2, 2019 03:45
Remote debug
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug (Launch) - Current File",
"request": "launch",
@fud
fud / modify-types.sh
Created April 2, 2019 05:50
Script to update fhir types.
grep interface index.d.ts | cut -d' ' -f6 | gsed -E 's/^(.*)$/export type \1 = fhir.\1;/g' | copy
@fud
fud / find-duplicates-mongo.js
Created March 28, 2019 04:08
Finds duplicates from a particular table in mongo.
mongo staging-hapi.geniesolutions.com.au:27017/admin --quiet --eval "DBQuery.shellBatchSize = 2000; db.auth('admin', 'XXXXXX'); db.getCollection('QuestionnaireResponse').find({}, { _id:0, 'source.reference': 1});" | sort | uniq -c