Skip to content

Instantly share code, notes, and snippets.

Avatar
🏴
Fuck ICE

Alyssa Ross alyssais

🏴
Fuck ICE
View GitHub Profile
View default.nix
{ stdenv, lib, makeWrapper, bundler, bundix, ruby }:
stdenv.mkDerivation {
name = "nix-gemspec";
src = ./.;
buildInputs = [ makeWrapper ruby ];
installPhase = ''
install -D -m755 nix-gemspec.rb $out/bin/nix-gemspec
patchShebangs $out/bin/nix-gemspec
@alyssais
alyssais / default.nix
Created Jan 22, 2019
Nix expression for building a reveal.js presentation using pandoc.
View default.nix
{ pkgs ? import (builtins.fetchTarball {
# nixpkgs-unstable 2019-01-22
url = https://github.com/NixOS/nixpkgs/archive/a5de41088031e6d3d4f799ef3964317a74e72169.tar.gz;
sha256 = "0ycsai65dbcwmns36a0pkxpsgpl86q273c27ag80nijfb1w88201";
}) {}
, revealjs ? pkgs.fetchFromGitHub {
owner = "hakimel";
repo = "reveal.js";
rev = "3.7.0";
View znc.nix
{ pkgs, ... }:
{
security.acme.certs."qyliss.net" = {
email = "hi@alyssa.is";
postRun = "systemctl reload nginx.service";
webroot = "/var/lib/acme/acme-challenge";
};
services.nginx.enable = true;
View dnscrypt-proxy-darwin.nix
{ ... }:
{
launchd.user.agents.dnscrypt-proxy = {
serviceConfig.RunAtLoad = true;
serviceConfig.KeepAlive = true;
serviceConfig.ProgramArguments = [
"${pkgs.dnscrypt-proxy2}/bin/dnscrypt-proxy"
"-config"
(toString (pkgs.writeText "dnscrypt-proxy.toml" ''
@alyssais
alyssais / networking.nix
Last active Oct 29, 2018
Featuring DNS over HTTPS and plausible MAC randomisation
View networking.nix
{ pkgs, ... }:
{
networking.networkmanager.enable = true;
networking.networkmanager.ethernet.macAddress = "random";
networking.networkmanager.wifi.macAddress = "random";
networking.networkmanager.extraConfig = ''
[connection-extra]
ethernet.generate-mac-address-mask=FE:FF:FF:00:00:00
wifi.generate-mac-address-mask=FE:FF:FF:00:00:00
View key
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBK6xI1vfSCrhGzxUylT/+nHT5Yq9XPjSssgGmtmsZeO
@alyssais
alyssais / vpn
Created May 8, 2018
A tiny command line interface to Viscosity
View vpn
#!/usr/bin/env bash
run_list() {
osascript <<OSA
tell application "Viscosity"
repeat with theConnection in connections
set theName to name of theConnection
set theState to state of theConnection
log theName & ": " & theState
end repeat
@alyssais
alyssais / dnsmasq.conf
Last active Apr 26, 2018
Use .localhost domains for Rails apps
View dnsmasq.conf
address=/.localhost/127.0.0.1
address=/.test/127.0.0.1
address=/.lvh.me/127.0.0.1
View signal
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
My Signal fingerprint: 20273 47553 69079 98765 30821 08445
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEENgEcZvPSC1GwnS7FbPBk0Unjq9sFAlq5ZTQACgkQbPBk0Unj
q9tW5Q/+JbvJjfjM3/00oaVlyVTG9KTkezSBeNoVH38Pz1SIoqw2Kq03F3xLTPnL
UzOz2LD7e6F0f2brDnf1GKnbUp0TSmtbG/QQhJizDCu51QegctccUxLPEvDZ+w2M
KgLfisimvERlIDhI5wBYBme/eemu21viaeriRN3T89zuK0MIlaWZamB9upmswzRf
@alyssais
alyssais / thread.rb
Created Mar 23, 2018
My really hacky livetweeting script. You pass in the ID of the tweet to continue the thread from.
View thread.rb
require "yaml"
require "twitter"
config = YAML.load_file(File.expand_path("~/.trc")).dig("profiles", "qyliss").each_value.first
last_status = ARGV.fetch(0)
twitter = Twitter::REST::Client.new do |t|
t.consumer_key = config.fetch("consumer_key")
t.consumer_secret = config.fetch("consumer_secret")
You can’t perform that action at this time.