Skip to content

Instantly share code, notes, and snippets.

View candeira's full-sized avatar

Javier Candeira candeira

View GitHub Profile
@candeira
candeira / README
Created July 6, 2022 07:51 — 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
@candeira
candeira / ubuntu-ec2-init.sh
Created June 27, 2021 01:08 — forked from ned2/ubuntu-ec2-init.sh
A Bash script for initialising a clean Ubuntu installation and user account with a pyenv-based workflow.
#!/usr/bin/env bash
# Author: Ned Letcher
#
# This bash script is designed to configure a clean Ubuntu installation (eg new
# EC2 instance) with a somewhat opionated set of packages and tools for working
# on Python projects. In addition to installing a range of packages for dev
# work, it installs pyenv for the current user, overwriting the current .profile
# and modifying the existing .bashrc to make sure pyenv is configured correctly.
@candeira
candeira / nixos.md
Created May 16, 2020 05:47 — forked from martijnvermaat/nixos.md
Installation of NixOS with encrypted root
@candeira
candeira / encryptedNixos.md
Created May 16, 2020 05:47 — forked from ladinu/encryptedNixos.md
NixOS install with encrypted /boot /root with single password unlock

Requirements

  1. Encrypt everthing including /boot and /root
  2. Enter password once
  3. Support UEFI

Installation media setup

Download NixOS minimal iso and copy to USB stick. For example on Mac OSX

$ diskutil list
$ diskutil unmountDisk /dev/disk1 # Make sure you got right device
@candeira
candeira / sc3-plugins.nix
Created October 9, 2019 04:17 — forked from gosub/sc3-plugins.nix
Nix package definition for sc3-plugins
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "sc3-plugins-3.7.0-beta";
src = fetchgit {
url = "https://github.com/supercollider/sc3-plugins";
rev = "a963ecb";
sha256="0840jwh7ljmhg34zblahqx3abk42a3y3gvgb740r558rphbp1p19";
fetchSubmodules = true;
@candeira
candeira / example-subtree-usage.md
Created August 18, 2017 07:12 — forked from kvnsmth/example-subtree-usage.md
A real world usage for git subtrees.

Let's say you have an iOS project, and you want to use some external library, like AFNetworking. How do you integrate it?

With submodules

Add the project to your repo:

git submodule add git@github.com:AFNetworking/AFNetworking.git Vendor/AFNetworking

or something to that effect.

@candeira
candeira / README.md
Last active August 29, 2015 14:07 — forked from anonymous/README.md

Part 1

Proof of concept

Say, you want to save your D3 application in a CouchDB database. This is just a proof of concept that this is possible. I use the »Focus + Context« diagram by Mike Bostock (http://bl.ocks.org/1667367) as an example.

Prerequisites:

@candeira
candeira / pr.md
Created March 25, 2013 21:46 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: