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
#!/bin/sh
# Setting this, so the repo does not need to be given on the commandline:
# export BORG_REPO=ssh://[email protected]:2022/~/backup/main
export BORG_REPO=/run/media/james/64gb/backup
# Setting this, so you won't be asked for your repository passphrase:
# export BORG_PASSPHRASE='XYZl0ngandsecurepa_55_phrasea&&123'
# or this to ask an external program to supply the passphrase:
export BORG_PASSCOMMAND='pass show backup'
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/nvme0n1p6 UUID=4197482b-94ec-45b1-bc8d-fc2074655f21
/dev/nvme0n1p6 / btrfs rw,noatime,compress=lzo,ssd,space_cache,subvolid=1299,subvol=/@arch,subvol=@arch 0 0
# /dev/nvme0n1p1 UUID=6AC9-F2C8
LABEL=ESP /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2
@jamesmcallister
jamesmcallister / monitor.sh
Created September 13, 2017 13:49
xrandr external monitor dell xps 13 9350, 4k, 1920x1200
#!/bin/bash
intern=eDP1
extern=DP1
internalSettings="xrandr --output $intern --primary --mode 3200x1800 --scale 1x1"
if xrandr | grep "$extern disconnected"; then
$internalSettings --output $extern --off
echo "-> Laptop Mode"
elif xrandr | grep "$extern connected 4160x2640+0+0"; then
@jamesmcallister
jamesmcallister / wdio.conf.js
Created July 27, 2017 20:21
Webdriverio headless chrome
capabilities: [
{
// maxInstances can get overwritten per capability. So if you have an in-house Selenium
// grid with only 5 firefox instances available you can make sure that not more than
// 5 instances get started at a time.
maxInstances: 10,
//
browserName: 'chrome',
chromeOptions: {
args: ['headless']
@jamesmcallister
jamesmcallister / gist:9f05325927b951de94e968ffeb9dd93e
Last active December 6, 2018 12:32
Docker - Delete images and containers
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
docker rm $(docker ps -a -q) && docker rmi $(docker images -q)
@jamesmcallister
jamesmcallister / aphrodite.js
Last active January 10, 2017 15:47
aphrodte react inline tachyons css
import React, {Component} from 'react'
import logo from './logo.svg'
import {StyleSheet, css} from 'aphrodite'
import t from 'tachyons-js'
class App extends Component {
render() {
const {styles} = App
return (
<div className={css(styles.App)}>
// to list extentions
// $ code --list-extensions
EditorConfig.EditorConfig
TimonVS.ReactSnippetsStandard
bialikover.theme-seti
chenxsan.vscode-standard-format
hoovercj.vscode-ghc-mod
justusadam.language-haskell
octref.tachyons
@jamesmcallister
jamesmcallister / npm-install-webpack-plugin
Last active July 10, 2016 09:19
npm-install-webpack-plugin
npm install -DE npm-install-webpack-plugin
// add the following line to the top
var = require('npm-install-webpack-plugin');
// add the following to the plugins object
plugins: [
new NpmInstallPlugin(),
]
@jamesmcallister
jamesmcallister / markdown.js
Created July 10, 2016 08:33
webpack markdown
import React, { Component } from 'react';
import fileurl from './readme.md'
class Markdown extends Component {
rawMarkup() {
return { __html: fileurl };
}
render() {
return (
<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>10.0.0.10</host>
<port>3306</port>
<user>kodi</user>
<pass>kodi</pass>
</videodatabase>
<musicdatabase>
<type>mysql</type>