Skip to content

Instantly share code, notes, and snippets.

View fud's full-sized avatar

Brenton Bills fud

  • Paypa Plane
  • Brisbane, Australia.
  • 15:20 (UTC +10:00)
View GitHub Profile

Setting up qemu VM using nix flakes

Did you know that it is rather easy to setup a VM to test your NixOs configuration?

Create simple flake:

# flake.nix
{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
@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 / python-init.sh
Created October 12, 2018 04:33 — forked from sio2boss/python-init.sh
Getting started on the right foot with python
# For linux python 3 instructions see https://gist.github.com/softwaredoug/a871647f53a0810c55ac
# Install python manager
brew install pyenv
# Install virtual environment manager
brew install pyenv-virtualenv
# Update your .zshrc
function saveSomething(something, callback){
var saved = righto(saveValue, something);
var updatedLastSavedTime = righto(updateLastSaveTime);
// We want the result of `saved`, but only after `updatedLastSavedTime` succeeds.
var result = righto.after(saved, updatedLastSavedTime);
result(callback);
}
@fud
fud / README.md
Created November 21, 2017 03:52 — forked from remarkablemark/README.md
Classes - ES5 vs ES6

JavaScript Classes - ES5 vs ES6

An example that shows the difference between creating a JavaScript class and subclass in ES5 and ES6.

Reference

@fud
fud / gist:cd432afe11549e051c7db9d8b184391f
Created November 3, 2017 01:30 — forked from KoryNunn/gist:5c6cb954a6d9be930d2a9b873cc34797
prototypical method binding Proxy
function bindContext(object){
return new Proxy({
get: function(target, key){
if(typeof target[key] === 'function' && !target.hasOwnProperty(key)){
return target[key].bind(target);
}
return target[key];
}
});
@fud
fud / 0_reuse_code.js
Last active September 4, 2015 03:45
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console