Skip to content

Instantly share code, notes, and snippets.

@arthurattwell
arthurattwell / stylus_basecamp-dark.css
Last active June 16, 2021 22:49
Dark mode for Basecamp 3 with Stylus
/* Work in progress.
A Basecamp 3 dark theme for Stylus
(https://addons.mozilla.org/en-US/firefox/addon/styl-us/)
based on https://userstyles.org/styles/177262/basecamp-insomnia */
:root
{
--bg-md: #18242b;
--bg-md-2: #152025;
--bg-lt: #213038;
@adisbladis
adisbladis / iso.nix
Created January 3, 2020 17:46
Nixos custom iso
# env NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz nix-build '<nixpkgs/nixos>' -A config.system.build.isoImage -I nixos-config=iso.nix --no-out-link --show-trace
{ config, lib, pkgs, ... }:
{
imports = [
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix>
];
boot.kernelPackages = pkgs.linuxPackages_latest;
@Solonarv
Solonarv / vinyl-capability.hs
Last active January 10, 2019 03:28
Monadic capabilities using vinyl.
{-# language FunctionalDependencies #-}
{-# language KindSignatures #-}
{-# language DerivingVia #-}
{-# language ScopedTypeVariables #-}
{-# language TypeApplications #-}
-- some extensions elided, GHC should tell you what they are
module Capability where
import Control.Monad.Reader
import Control.Monad.State
{-# LANGUAGE GADTs, LambdaCase #-}
-- I haven't compiled this and wrote it before any coffee
-- so please don't laugh at me if it doesn't compile lol
module Turtle ( Turtle, left, right, forward, backward) where
import Graphics.Gloss
import Control.Monad.State
import Control.Lens
@collinbarrett
collinbarrett / userChrome.css
Last active April 11, 2024 10:22
A userChrome.css to use with Tree Style Tab (https://github.com/piroor/treestyletab) for Firefox
/*
Windows
Location: C:\Users\<YourUsername>\AppData\Roaming\Mozilla\Firefox\Profiles\<YourFirefoxProfile>\chrome
Notes:
If minimize, maximize, and close buttons are no longer visible, enable the Title Bar or Menu Bar in Firefox Customize.
macOS
Location: /Users/<YourUsername>/Library/Application Support/Firefox/Profiles/<YourFirefoxProfile>/chrome
Notes:
If minimize, maximize, and close buttons overlap other controls, add the Flexible Space in Firefox Customize.
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active June 2, 2025 05:16 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

#!/bin/bash
# TODO: Get current git tag
VER=${1:-"1.0.0"}
psc-package dependencies | perl -pe 's/^(.*)$/"\1"/g' | jq -s . > deps.json
jq < psc-package.json --slurpfile bower bower.json --slurpfile deps deps.json --arg version "$VER" --arg deps "$DEPS" \
'{(.name): { dependencies: ($deps | .[0]), repo: ($bower | .[0].repository.url | gsub("git:";"https:") ), version: $version } }'
@nwolverson
nwolverson / package-from-bower.sh
Created March 9, 2017 21:07
create psc-package.json from bower.json
#!/bin/bash
SET=${1:-"erl-0.10.5"}
SOURCE=${2:-"https://github.com/purerl/package-sets.git"}
if [ ! -f "psc-package.json" ]; then
jq < bower.json "{name, set: \"$SET\", source: \"$SOURCE\", depends: [] }" > psc-package.json
fi
jq < bower.json '.dependencies | keys | map(gsub("purescript-";"")) | join("\n")' -r | while read -r line ; do
psc-package install $line;
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
import Control.Monad.IO.Class
import Control.Monad.Trans.Class
import Prelude hiding (log)
--------------------------------------------------------------------------------
-- The API for cloud files.
class Monad m => MonadCloud m where
saveFile :: Path -> Bytes -> m ()
import Control.Applicative
import Control.Lens
import Data.List (isInfixOf, length)
import Data.Validation
-- Defining `newtype`s
newtype Name = Name { unName :: String } deriving (Show)
newtype Email = Email { unEmail :: String } deriving (Show)
newtype Age = Age { unAge :: Int } deriving (Show)