Skip to content

Instantly share code, notes, and snippets.

@frio
frio / fitbit_example.py
Last active December 24, 2015 06:39
Example OAuth workflow for Orion-supported project
#!/usr/bin/env python3
"""
This is a sample workflow for obtaining data from the Fitbit API in Python. It's pretty scrappy right now as I've hacked it together from http://requests-oauthlib.readthedocs.org/en/latest/oauth1_workflow.html. This example exists for supporting a student project that our company is supporting.
Hopefully it's pretty clear how it works. I've tried to leave comments where applicable.
Requires requests, requests_oauthlib
"""
# coding: utf-8
@frio
frio / Vagrantfile
Created January 30, 2014 23:44
Boilerplate Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
provision = <<PROVISION
echo 'Provisioned!'
PROVISION
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
diff --git a/daemon/gamemode-config.c b/daemon/gamemode-config.c
index 6b8f5d9..c1fe921 100644
--- a/daemon/gamemode-config.c
+++ b/daemon/gamemode-config.c
@@ -346,7 +346,7 @@ static void load_config_files(GameModeConfig *self)
bool protected;
};
struct ConfigLocation locations[CONFIG_NUM_LOCATIONS] = {
- { "/usr/share/gamemode", true }, /* shipped default config */
+ { "@gamemode@/share/gamemode", true }, /* shipped default config */
{ config, pkgs, ... }:
{
boot.initrd.availableKernelModules = [
"xhci_pci"
"ehci_pci"
"ahci"
"usbhid"
"usb_storage"
@frio
frio / sound.nix
Created September 22, 2019 05:52
{ config, pkgs, ... }:
{
# Enable sound and Bluetooth headset support
sound.enable = true;
hardware.pulseaudio.enable = true;
hardware.pulseaudio.extraModules = [ pkgs.pulseaudio-modules-bt ];
hardware.pulseaudio.package = pkgs.pulseaudioFull;
hardware.bluetooth.enable = true;