Skip to content

Instantly share code, notes, and snippets.

View jamesmcallister's full-sized avatar
💭
BRB on gitlab

James McAllister jamesmcallister

💭
BRB on gitlab
View GitHub Profile
@jamesmcallister
jamesmcallister / whiskybase.js
Last active June 5, 2020 12:26
whiskybase random tipple
function whichWeDram() {
const openBottles = [...document.getElementsByClassName("shelft-bottle-open")].map(
({ firstElementChild }) => firstElementChild.dataset.title,
);
const closedBottles = [...document.getElementsByClassName("shelft-bottle-closed")].map(
({ firstElementChild }) => firstElementChild.dataset.title,
);
@jamesmcallister
jamesmcallister / settigns.json
Created March 23, 2020 09:45
vscode settings
{
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"breadcrumbs.enabled": true,
"color-highlight.markerType": "dot-before",
"editor.fontFamily": "\"JetBrains Mono\"",
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/james/.oh-my-zsh"
export USER_HOME=$HOME
export ANDROID_HOME="/Users/james/Library/Android/sdk"
export ANDROID_SDK_ROOT="/Users/james/Library/Android/sdk"
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
function avergePrice() {
var values = [
...new Set(
$$(".POSITIVE")
.map((i) => i.innerHTML.replace("£", ""))
.map(i => parseInt(i))
.filter(i => !Number.isNaN(i))
.sort((a, b) => a - b)
)
];
{
"env": {
"browser": true,
"mocha": true,
"node": true,
"jest": true
},
"globals": {
"module": false,
{
"env": {
"browser": true,
"mocha": true,
"node": true,
"jest": true
},
"globals": {
"module": false,
# docker-compose.yml
...
command: npm run debug
ports:
- "3000:3000"
- "9229:9229"
...
--------------------------------------------------------
@jamesmcallister
jamesmcallister / iframePage.html
Created August 4, 2018 13:04
eval js code in an iframe
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
--select * from properties
--select price from properties
--select * from properties where location = 'Angel'
--select * from properties where agent = 'Duckworth'
--select * from properties where date_sold is null;
--select * from properties order by price;
--select * from properties order by price limit 5;
--select distinct agent from properties;
--select * from properties where bedrooms = 2 and bathrooms = 2;
--select min(price) from properties;

Arch Linux btrfs install

Prerequisites

  • Plenty of storage - snapshots will take lot of space
  • Latest Arch Linux install iso because those have newer kernels and more bugfixes in btrfs.
  • Have previous experience with installing Arch (like you can install arch with a blind fold).

1. Parititions

We will need two of them, one for /boot and the other one will be a btrfs partition with subvolumes.

  1. /dev/sda1 - this will be /boot with vfat filesystem because UEFI or syslinux for legacy BIOS boot