Skip to content

Instantly share code, notes, and snippets.

@JoelBCarter
JoelBCarter / youtube.txt
Created September 27, 2023 19:47
PiHole List for YouTube
0.0.0.0 googlevideo.com
0.0.0.0 gvt1.com
0.0.0.0 video.google.com
0.0.0.0 video.l.google.com
0.0.0.0 youtu.be
0.0.0.0 youtube.ae
0.0.0.0 youtube.al
0.0.0.0 youtube.am
0.0.0.0 youtube.at
0.0.0.0 youtube.az
@JoelBCarter
JoelBCarter / MuteSkype.ps1
Last active March 6, 2017 21:25
Quick way to mute Skype on Windows
Add-Type @"
using System;
using System.Runtime.InteropServices;
public class Tricks {
[DllImport("user32.dll")]
public static extern IntPtr GetForegroundWindow();
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
@JoelBCarter
JoelBCarter / .block
Last active February 8, 2017 06:33
blue bar chart
license: mit
@JoelBCarter
JoelBCarter / .block
Last active February 8, 2017 17:56
green bar chart
license: mit
@JoelBCarter
JoelBCarter / prometheus.yml
Created October 10, 2016 20:10
Sample Prometheus scrape config for obtianing metrics from Kubernetes pods via DNS & Headless Service
scrape_configs:
- job_name: 'your_kubernetes_pod'
dns_sd_configs:
- refresh_interval: 15s
names:
- {headless-service-name}.default.svc.cluster.local
relabel_configs:
# Change default port we get from DNS (0) to expected port ({your_pod_port})
- source_labels: [__address__]
action: replace
@JoelBCarter
JoelBCarter / prettified-1.8.2-underscore-min.js
Created August 18, 2016 22:58
Prettified 1.8.2 version of underscore-min.js vs string from comment
(function () {
function n(n) {
function t(t, r, e, u, i, o) {
for (; i >= 0 && o > i; i += n) {
var a = u ? u[i] : i; e = r(e, t[a], a, t)
}
return e
}
return function (r, e, u, i) {
e = d(e, i, 4); var o = !w(r) && m.keys(r), a = (o || r).length, c = n > 0 ? 0 : a - 1;
@JoelBCarter
JoelBCarter / packer-docker-aws.json
Created June 14, 2016 23:12
A Packer template for building a Docker container host on an AWS EC2 instance.
{
"variables": {
"aws_access_key": "",
"aws_secret_key": ""
},
"builders": [
{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
@JoelBCarter
JoelBCarter / Vagrantfile
Last active January 1, 2016 18:18
A Vagrantfile for running the [Learn to manage a basic Ubuntu web application](https://learn.chef.io/manage-a-web-app/ubuntu/) Chef tutorial locally
# -*- mode: ruby -*-
# vi: set ft=ruby :
module LocalCommand
class Config < Vagrant.plugin("2", :config)
attr_accessor :command
end
class Plugin < Vagrant.plugin("2")
name "shell_local"