Skip to content

Instantly share code, notes, and snippets.

View BenSchZA's full-sized avatar
🎯
Focusing

Benjamin Scholtz BenSchZA

🎯
Focusing
View GitHub Profile

Nix Flake MVP

Goals

  • To provide Nix repositories with an easy and standard way to reference other Nix repositories.

  • To allow such references to be queried and updated automatically.

  • To provide a replacement for nix-channel, NIX_PATH and Hydra

@lightdiscord
lightdiscord / default.nix
Last active October 13, 2022 04:41
Rust and wasm with nixos
with import <nixpkgs> {
overlays = map (uri: import (fetchTarball uri)) [
https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz
];
};
stdenv.mkDerivation {
name = "rust-wasm";
buildInputs = [
cargo-web
@ejpcmac
ejpcmac / shell.nix
Last active March 10, 2021 16:37
Example shell.nix for Nerves projects, setting both Erlang and Elixir versions
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
let
inherit (lib) optional optionals;
erlangDrv = { mkDerivation }:
mkDerivation rec {
version = "21.0";
#!/bin/bash
# Retrieves the installed `pacman` package lists and syncs them with my remote git repo
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@iamdtang
iamdtang / gist:be8b4cc9558b3b6ab6cbef23150debe2
Created November 29, 2017 00:44
get bearer token from Twitter REST API for application-only authentication
require('dotenv').config();
const request = require('request');
const credentials = `${process.env.CONSUMER_KEY}:${process.env.CONSUMER_SECRET}`;
const credentialsBase64Encoded = new Buffer(credentials).toString('base64');
request({
url: 'https://api.twitter.com/oauth2/token',
method:'POST',
headers: {
@estorgio
estorgio / Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS.md
Last active March 8, 2024 17:34
Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS

Update 28 July 2019: An updated version of this guide for Ubuntu Server 18.04 LTS is now available. Feel free to check it out.

Update 23 May 2020: This guide is ALREADY OUTDATED and might no longer work with new versions of Ubuntu and VirtualBox. Please consider switching to the updated guide instead. I will no longer respond to the replies to this gist. Thank you.

Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS

This guide will walk you through steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest. Tested on Ubuntu Server 16.04.3 LTS (Xenial Xerus)

@guipmourao
guipmourao / ubuntu16.04-command-line-install-android-sdk
Created March 15, 2017 12:17
Ubuntu 16.04 command line install android sdk
# create sdk folder
export ANDROID_HOME=/opt/android-sdk-linux
sudo mkdir -p $ANDROID_HOME
# install openjdk
sudo apt-get install openjdk-8-jdk
# download android sdk
cd $ANDROID_HOME
sudo wget https://dl.google.com/android/repository/tools_r25.2.3-linux.zip
@ruuda
ruuda / basic-proxy.hs
Last active July 28, 2022 16:52
Minimal proxy server in Haskell
#!/usr/bin/env stack
{- stack
--resolver lts-7.3
--install-ghc
runghc
--package base
--package bytestring
--package dns
--package http-client
--package http-types
@tyrell
tyrell / docker-install-rpi3.md
Last active December 22, 2023 07:36
Installing latest Docker on a Raspberry Pi 3

Introduction

I wrote this gist to record the steps I followed to get docker running in my Raspberry Pi 3. The ARM ported debian version (Jessie) comes with an old version of docker. It is so old that the docker hub it tries to interact with doesn't work anymore :)

Hopefully this gist will help someone else to get docker running in their Raspberry Pi 3.

Installation

From original instructions at http://blog.hypriot.com/post/run-docker-rpi3-with-wifi/

@devStepsize
devStepsize / slack_webhook_post.py
Last active August 7, 2023 09:28
POST a JSON payload to a Slack Incoming Webhook using Python requests
'''
This is an example of how to send data to Slack webhooks in Python with the
requests module.
Detailed documentation of Slack Incoming Webhooks:
https://api.slack.com/incoming-webhooks
'''
import json
import requests