Skip to content

Instantly share code, notes, and snippets.

View jscott22's full-sized avatar

Jason Scott jscott22

  • Tink
  • Gothenburg, Sweden
View GitHub Profile
@jscott22
jscott22 / full-disk-encryption-arch-uefi.md
Created June 28, 2019 05:13 — forked from huntrar/full-disk-encryption-arch-uefi.md
Arch Linux Full-Disk Encryption Installation Guide [Encrypted Boot, UEFI, NVMe, Evil Maid]

Arch Linux Full-Disk Encryption Installation Guide

This guide provides instructions for an Arch Linux installation featuring full-disk encryption via LVM on LUKS and an encrypted boot partition (GRUB) for UEFI systems.

Following the main installation are further instructions to harden against Evil Maid attacks via UEFI Secure Boot custom key enrollment and self-signed kernel and bootloader.

Preface

You will find most of this information pulled from the Arch Wiki and other resources linked thereof.

Note: The system was installed on an NVMe SSD, substitute /dev/nvme0nX with /dev/sdX or your device as needed.

lsp

lsp

(def-package! lsp-mode
  :init
  (add-to-list 'exec-path "/Users/jay/elixir-ls/release")
  :config
  (setq lsp-enable-eldoc t
        lsp-enable-completion-at-point t))
@jscott22
jscott22 / evil-refresh-cursor.el
Created March 19, 2019 14:25 — forked from yuhan0/evil-refresh-cursor.el
rate limit evil-refresh-cursor
(defvar evil--refresh-cursor-last-executed 0
"Unix time of when the evil cursor was last refreshed")
(defvar evil-refresh-cursor-delay 0.1
"Max delay in seconds between each cursor refresh")
(defvar evil--refresh-cursor-current-timer nil
"Current timer keeping track of cursor refresh changes")
(defvar evil--refresh-cursor-delayed-specs nil
"Cons pair of cursor (state . buffer) to set after the delay")
@jscott22
jscott22 / replace.ts
Created July 18, 2017 09:43
kendo date replace
private rules = {
validtime: (input) => {
if (input.is("[data-type=time-picker]")) {
let val = input.val().toString();
val = val.replace(/[^0-9\.\,\:]/g, "");
val = val.replace(/[,.]/g, ":");
if (val.indexOf(":") === -1) {
if (val.length === 3) {
@jscott22
jscott22 / header-upload.js
Created June 19, 2017 08:57
Image picker with validation for file type inputs in standard forms
(function() {
if($('#new-upload').length > 0) {
var _URL = window.URL || window.webkitURL;
var $imagePreview = $('.image-preview');
var sizeLimit = 300;
var dimLimit = 1024;
var fileTypes = "image/png image/jpeg image/gif img/bmp";
@import "../mixins";
@import "../variables";
@mixin on-circle($item-count, $circle-size, $item-size) {
position: relative;
width: $circle-size;
height: $circle-size;
padding: 0;
border-radius: 50%;
list-style: none;
/**
* Created by jay on 5/30/17.
*/
(function () {
var circData = [
{
percent: 0.9,
tag: 'Arbete'
},
@jscott22
jscott22 / startpage.js 2
Created June 1, 2017 08:54
Sets up a fullpage.js startpage with a slider for each section.
(function () {
var $nav = $('nav.top-nav');
var navHidden = false;
var slideDuration = 200;
var $fullPage = $('#fullpage');
var haveFullPage = $fullPage.length > 0;
var sliderArray = [];
function sectionLoad(section) {
<?php
$taxonomy = 'product_cat';
$orderby = 'name';
$show_count = 0; // 1 for yes, 0 for no
$pad_counts = 0; // 1 for yes, 0 for no
$hierarchical = 1; // 1 for yes, 0 for no
$title = '';
@jscott22
jscott22 / css-checkbox.scss
Last active June 1, 2017 09:06
css checkbox
.css-checkbox {
font-size: 16px;
input[type="checkbox"]:not(old) {
width: 2em;
margin: 0;
padding: 0;
opacity: 0;
font-size: 1em;