Skip to content

Instantly share code, notes, and snippets.

@hadilq
hadilq / NixOS-guide.md
Last active March 23, 2024 14:17
Encypted LUKS LVM Btrfs Root with Opt-in State on NixOS

I'm trying to follow this guide to install NixOS using Btrfs, LUKS and LVM. The main usage of this page for me will be remembering what I did! My laptop is ASUS ROG GL553VD.

Just downloaded Plasma Desktop, 64bit and create a bootable Flash Drive. Then boot up to NixOS Live CD. Using gparted to create two partitions, One 200MB vfat EFI partittion and the rest of SSD drive will be an encrypted partition.

DISK=/dev/nvme0n1
@ageis
ageis / YubiKey-GPG-SSH-guide.md
Last active March 16, 2024 13:18
Technical guide for using YubiKey series 4 for GPG and SSH

YubiKey 4 series GPG and SSH setup guide

Written for fairly adept technical users, preferably of Debian GNU/Linux, not for absolute beginners.

You'll probably be working with a single smartcard, so you'll want only one primary key (1. Sign & Certify) and two associated subkeys (2. Encrypt, 3. Authenticate). I've published a Bash function which automates this slightly special key generation process.

@nrollr
nrollr / Backup_iPhone_TimeCapsule.sh
Created November 1, 2016 16:42
iOS device backup to Time Capsule
# Create the appropriate directory structure on the TimeCapsule and mount the root folder ('Data' in this example)
# Backup path: /Volumes/Data/iOS/Backup/
$ cp -r ~/Library/Application\ Support/MobileSync/Backup/ /Volumes/Data/iOS
$ cd ~/Library/Application\ Support/MobileSync/
$ rm -r Backup/
$ ln -s /Volumes/Data/iOS/Backup/ ~/Library/Application\ Support/MobileSync/
# Open iTunes select your iPhone/iPad and click 'Back Up Now'-buttom
@nrollr
nrollr / nginx.conf
Last active April 22, 2024 15:11
NGINX config for SSL with Let's Encrypt certs
# UPDATED 17 February 2019
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
listen [::]:80;
server_name www.domain.com domain.com;
return 301 https://$host$request_uri;
}
# SSL configuration
@Avaq
Avaq / combinators.js
Last active May 1, 2024 09:38
Common combinators in JavaScript
const I = x => x
const K = x => y => x
const A = f => x => f (x)
const T = x => f => f (x)
const W = f => x => f (x) (x)
const C = f => y => x => f (x) (y)
const B = f => g => x => f (g (x))
const S = f => g => x => f (x) (g (x))
const S_ = f => g => x => f (g (x)) (x)
const S2 = f => g => h => x => f (g (x)) (h (x))
@frozeman
frozeman / mistweb3.js
Last active July 22, 2021 01:00
Mist web3 loading proposal
/*
Basically "web3" comes from Mist,
but "Web3" CAN come from the dapp.
A Dapp has 3 ways to use web3.
2. and 3. would work when in Mist and outside.
*/
// 1. simply use, web3 comes already defined
@ali-abrar
ali-abrar / index.html
Last active June 8, 2020 04:47
Setting up Leaflet.js with Reflex.Dom
<!DOCTYPE html>
<html>
<head>
<!-- Add leaflet css -->
<link
rel="stylesheet" href="https://unpkg.com/leaflet@1.5.1/dist/leaflet.css"
integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ=="
crossorigin=""
/>
@matthieubulte
matthieubulte / p-a-t.md
Last active October 4, 2015 21:22
Propositions as Types

List of papers (with links to the PDF versions) mentioned in Philip Wadler's presentation on Propositions as Types at StrangeLoop 2015 (https://www.youtube.com/watch?v=IOiZatlZtGU)

@tfausak
tfausak / wss.hs
Last active August 10, 2021 18:25
Secure WebSockets in Haskell.
-- base ==4.7.0.1
-- bytestring ==0.10.4.0
-- connection ==0.2.4
-- network ==2.4.2.3
-- text ==1.1.0.0
-- websockets ==0.9.3.1
import Control.Concurrent (forkIO)
import Control.Monad (forever, void)
import qualified Data.ByteString as BS
@ageis
ageis / openpgp-card-guide.md
Last active December 11, 2023 09:36
Quick GPG Smartcard Guide