Skip to content

Instantly share code, notes, and snippets.

View jfroche's full-sized avatar

Jean-François Roche jfroche

  • Namur, Belgium
  • 05:52 (UTC +02:00)
View GitHub Profile
@jfroche
jfroche / flake-fzf.sh
Last active September 15, 2023 20:06
flake + fzf = ❤
#!/usr/bin/env bash
set -euo pipefail
system=$(nix-instantiate --eval --expr 'builtins.currentSystem' --json | jq -r)
selection=$(
nix flake show --json |
jq -r '
[
leaf_paths as $path |
{"key": $path | join("."), "value": getpath($path)} |
select( .key | endswith("type")) |
@jfroche
jfroche / boxstarter.ps1
Last active June 6, 2023 20:28 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@jfroche
jfroche / install-nix-no-root.sh
Created March 3, 2022 22:14
Nix install without root access
function install_nix() {
set -x
local -r bindir="${HOME}/bin"
local -r proot_url="https://github.com/proot-me/proot/releases/download/v5.3.0/proot-v5.3.0-x86_64-static"
local -r nixdir="${HOME}/mnt/nix"
local -r nixver="2.5.1"
local -r arch="x86_64"
local -r os="linux"
local -r nix_url="https://releases.nixos.org/nix/nix-${nixver}/nix-${nixver}-${arch}-${os}.tar.xz"
local -r nix_cli_dir=nix-${nixver}-${arch}-${os}

Keybase proof

I hereby claim:

  • I am jfroche on github.
  • I am jfroche (https://keybase.io/jfroche) on keybase.
  • I have a public key whose fingerprint is 7EB1 C02A B62B B464 6D7C E4AE D1D0 9DE1 69EA 19A0

To claim this, I am signing this object:

@jfroche
jfroche / test_devpi.sh
Last active January 4, 2016 02:39
devpi buildout imio
git clone git@github.com:fschulze/devpi-buildout.git
cd devpi-buildout
virtualenv .
bin/python bootstrap.py
bin/buildout
bin/devpid
bin/devpictl status
sudo netstat -pantu|grep 8141
@jfroche
jfroche / setup_rtd.sh
Last active January 3, 2016 02:59
readthedocs.org
sudo apt-get install python-virtualenv git
git clone https://github.com/rtfd/readthedocs.org.git
virtualenv .venv
source .venv/bin/activate
easy_install -U setuptools
pip install --upgrade pip
sudo apt-get install libxml2-dev libxslt-dev
sudo apt-get install python-dev
sudo apt-get install libpq-dev
sudo apt-get install postgresql
@jfroche
jfroche / create_serf_deb.sh
Created November 22, 2013 10:14
serf deb package
#!/bin/bash
mkdir serf
cd serf/
wget https://dl.bintray.com/mitchellh/serf/0.2.1_linux_amd64.zip
unzip 0.2.1_linux_amd64.zip
fpm -s dir -t deb -n "serf" -v 0.2.1 --prefix /usr/local/bin serf
@jfroche
jfroche / custom_python27_on_precise.sh
Created November 21, 2013 15:27
Deb Packaging custom python 2.7 using checkinstall
#!/bin/bash
set -ex
sudo apt-get install build-essential libsqlite3-dev zlib1g-dev libncurses5-dev libgdbm-dev libbz2-dev libreadline6-dev libssl-dev libdb-dev checkinstall -y
wget http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
tar -xzf Python-2.7.6.tgz
cd Python-2.7.6
./configure --prefix=/opt/python27 --enable-shared
make