This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diskutil list | |
diskutil eraseDisk MS-DOS "WIN11" GPT /dev/disk4 | |
hdiutil mount ~/Downloads/Win11_22H2_EnglishInternational_x64v2.iso | |
rsync -vha --exclude=sources/install.wim /Volumes/CCCOMA_X64FRE_EN-US_DV9/* /Volumes/WIN11 | |
ll /Volumes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
job "pi-hole" { | |
datacenters = ["homelab"] | |
type = "system" | |
constraint { | |
attribute = "${attr.kernel.name}" | |
value = "linux" | |
} | |
constraint { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CALL apoc.periodic.commit(" | |
OPTIONAL MATCH (current:Xkcd) WITH current ORDER BY current.id DESC LIMIT 1 | |
OPTIONAL MATCH (oldest:Xkcd) WITH current, oldest ORDER BY oldest.id ASC LIMIT 1 | |
WITH current.id AS current_issue, | |
CASE | |
WHEN oldest IS NULL THEN 1 | |
WHEN oldest.id = 1 THEN current.id END | |
AS oldest_issue, 'https://xkcd.com/info.0.json' AS uri | |
CALL apoc.load.jsonParams(uri, null, null) | |
YIELD value WITH value.num AS latest_issue, current_issue, oldest_issue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.bd-callout { | |
padding: 1.25rem; | |
margin-top: 1.25rem; | |
margin-bottom: 1.25rem; | |
border: 1px solid #eee; | |
border-left-width: .25rem; | |
border-radius: .25rem | |
} | |
.bd-callout h4 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export S3_BUCKET= | |
# clean public build dir | |
rm -rf public | |
# rebuild site | |
hugo | |
# destructively sync with S3 bucket | |
# (anything not mirrored on the local filesystem will be deleted) | |
aws s3 sync public/ s3://$S3_BUCKET/ --delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
# config.vm.box = "bento/ubuntu-16.04" | |
config.vm.box = "ubuntu/trusty64" | |
# RabbitMQ ports | |
config.vm.network :forwarded_port, guest: 5672, host: 5672 | |
config.vm.network :forwarded_port, guest: 5673, host: 5673 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Global Python log configuration settings | |
@author mblum | |
""" | |
from __future__ import division | |
from __future__ import absolute_import | |
from __future__ import print_function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package size_checker; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.InputStream; | |
public class SizeChecker { | |
NewerOlder