Given
- I use a VPN to connect to my work network
- I'm on a Linux computer that uses systemd-resolved
- I have a work domain called
example.com
example.com
is hosted by both public and private DNS nameservers
/** | |
* A script to auto add // @ts-ignore to lines with TypeScript compilation error | |
* Example usage: | |
* $ npx tsc > compilation-errors.log | |
* $ npx ts-node auto-ts-ignore.ts compilation-errors.log | |
*/ | |
import { readFile, writeFile } from 'fs/promises' | |
const errorLogFile = process.argv[2] |
This is a simple guide on how to automate UK lights with a Shelly 1 by installing the shelly 1 relay into the ceiling pendant which has both permanent live, neutral and a switched live back from the wall switch.
These steps are from my own experience making my lighting "smart" but also user friendly (it works via a wall switch!). This simple guide will go through replacing an a normal ceiling pendant with one with room for a Shelly 1. If you have a ceiling light with a bigger base it's even easier.
Warning Electrical regulations must be followed by law. If you are not a competent person under the regulations do not attempt electrical work. https://www.diydoctor.org.uk/projects/electrical_safety.htm
This diagram has been taken from here and modified to include the Shelly 1.
# press space + b and connect the usb port | |
# build | |
docker run -e keymap=iso_vim_arrow -e keyboard=dz60 --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware | |
# flash | |
sudo dfu-programmer atmega32u4 erase --force | |
sudo dfu-programmer atmega32u4 flash dz60_iso_vim_arrow.hex | |
sudo dfu-programmer atmega32u4 reset |
# /etc/udev/rules.d/20-bt-auto-enable-a2dp.rules | |
# hxss | |
SUBSYSTEM=="bluetooth", ACTION=="add", RUN+="/home/hxss/.config/scripts/xorg/bt-auto-enable-a2dp.sh" |
First things first, I want to use ag to search through my project files. Coming from fzf, I like to have two bindings for this -- one that respects my projects .gitignore
and one that does not. The latter is helpful if I want to examine a built file or look at a node_module dependency while working on my js project.
I use an alias for file_rec
source to toggle the -u
flag on ag
. Now, <C-P>
searches in my git files, and <C-O>
searches everything.
" denite file search (c-p uses gitignore, c-o looks at everything)
map <C-P> :DeniteProjectDir -buffer-name=git -direction=top file_rec/git<CR>
map :DeniteProjectDir -buffer-name=files -direction=top file_rec
files: | |
"/etc/nginx/conf.d/gzip.conf": | |
mode: "644" | |
owner: "root" | |
group: "root" | |
content: | | |
# enable gzip compression | |
gzip on; | |
gzip_min_length 1100; | |
gzip_buffers 4 32k; |
const gutil = require('gulp-util'); | |
const ftp = require( 'vinyl-ftp' ); | |
const sftp = require('gulp-sftp'); | |
// task for deploying files on the server | |
gulp.task('deploy', function() { | |
const config = require('./sftp-config.json'); | |
const globs = [ | |
'folder/file', |
Resources: | |
AWSEBLoadBalancer: | |
Type: "AWS::ElasticLoadBalancing::LoadBalancer" | |
Properties: | |
HealthCheck: | |
Target: "HTTP:80/health.html" |
// Alerts | |
@include alert-variant($background, $border, $text-color); | |
// Background Variant | |
@include bg-variant($parent, $color); | |
// Border Radius | |
@include border-top-radius($radius); | |
@include border-right-radius($radius); | |
@include border-bottom-radius($radius); |