Skip to content

Instantly share code, notes, and snippets.

/* From https://github.com/raspberrypi-ui/rc_gui/blob/master/src/rc_gui.c#L23-L70 */
#define GET_CAN_EXPAND "sudo raspi-config nonint get_can_expand"
#define EXPAND_FS "sudo raspi-config nonint do_expand_rootfs"
#define GET_HOSTNAME "sudo raspi-config nonint get_hostname"
#define SET_HOSTNAME "sudo raspi-config nonint do_hostname %s"
#define GET_BOOT_CLI "sudo raspi-config nonint get_boot_cli"
#define GET_AUTOLOGIN "sudo raspi-config nonint get_autologin"
#define SET_BOOT_CLI "sudo raspi-config nonint do_boot_behaviour B1"
#define SET_BOOT_CLIA "sudo raspi-config nonint do_boot_behaviour B2"
#define SET_BOOT_GUI "sudo raspi-config nonint do_boot_behaviour B3"
@frak
frak / python_environment_setup.md
Created January 27, 2019 15:49 — forked from Geoyi/python_environment_setup.md
Setting up your python development environment (with pyenv, virtualenv, and virtualenvwrapper)

Overview

When you're working on multiple coding projects, you might want a couple different version of Python and/or modules installed. That way you can keep each project in its own sandbox instead of trying to juggle multiple projects (each with different dependencies) on your system's version of Python. This intermediate guide covers one way to handle multiple Python versions and Python environments on your own (i.e., without a package manager like conda). See the Using the workflow section to view the end result.

Use cases

  1. Working on 2+ projects that each have their own dependencies; e.g., a Python 2.7 project and a Python 3.6 project, or developing a module that needs to work across multiple versions of Python. It's not reasonable to uninstall/reinstall modules every time you want to switch environments.
  2. If you want to execute code on the cloud, you can set up a Python environment that mirrors the relevant
@frak
frak / post-checkout
Last active November 14, 2017 15:34 — forked from lyrixx/post-checkout
Check for new dependencies and/or parameters after checkout
#!/bin/bash
# Put this file at: .git/hooks/post-checkout
# and make it executable
# You can install it system wide too, see http://stackoverflow.com/a/2293578/685587
PREV_COMMIT=$1
POST_COMMIT=$2
NOCOLOR='\033[0m'