Skip to content

Instantly share code, notes, and snippets.

View jack828's full-sized avatar
🏴󠁧󠁢󠁳󠁣󠁴󠁿
Dare Mighty Things

Jack Burgess jack828

🏴󠁧󠁢󠁳󠁣󠁴󠁿
Dare Mighty Things
View GitHub Profile
@jack828
jack828 / mdns-setup.sh
Last active December 12, 2023 18:54
TrueNAS Jail mDNS Setup Kickstarter
# An explanation of this script is available on my blog https://jackburgess.dev/blog/truenas-jails-access-via-mdns
# This allows you a nice way of connecting to your jails via their hostname using mDNS
# e.g. for Netdata, which runs on port 3000, you can access it on your jail via:
# http://<jail ip>:3000/
# But wouldn't it be nice to access it on
# http://jailhostname.local/
#
# Oneliner to kickstart
# pkg install -y curl && curl --silent https://gist.githubusercontent.com/jack828/b8375b16b6fb9eae52201d4deb563ab7/raw | /bin/sh -s PORT
@liuyanghejerry
liuyanghejerry / index.html
Last active April 2, 2024 20:16
Modern index file in 2017
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<!-- content-type, which overrides http equivalent header. Because of charset, this meta should be set at first. -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- Overrides http equivalent header. This tells IE to use the most updated engine. -->
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<!-- Tells crawlers how to crawl this page, and the role of this page. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta -->
<meta name="robots" content="index, follow">
@henriquemenezes
henriquemenezes / android-generate-keystores.md
Last active April 6, 2024 13:37
Android: Generate Release/Debug Keystores

Android: Generate Release/Debug Keystores

Generate Keystores

Debug Keystore

$ keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 -dname "C=US, O=Android, CN=Android Debug"
@rathboma
rathboma / README
Last active July 29, 2022 07:48
LenovoT440s thinkfan configuration
INSTRUCTIONS:
```bash
sudo cp thinkfan.conf /etc/thinkfan.conf
sudo echo 'options thinkpad_acpi fan_control=1' > /etc/modprobe.d/thinkpad_acpi.conf
sudo reboot # for the modprobes to work
sudo emacs /etc/defaults/thinkfan # change START=no to START=yes
```
@nathanielc
nathanielc / gist:9b98350ccbcbf21256d7
Created August 20, 2014 05:07
Minecraft systemd unit file
[root@plex ~]# cat /etc/systemd/system/minecraft@.service
[Unit]
Description=Minecraft Server %i
[Service]
WorkingDirectory=/opt/minecraft-%i
User=mcserver
ExecStart=/usr/bin/screen -DmS mc-%i /bin/java -Xmx2048M -jar minecraft_server.jar nogui
@bmcbride
bmcbride / deleteFromImgur.js
Last active May 25, 2022 17:53
Upload image from HTML form to http://imgur.com/
function deleteFromImgur() {
$.ajax({
url: "https://api.imgur.com/3/image/{id}",
type: "DELETE",
headers: {
"Authorization": "Client-ID YOUR-CLIEND-ID-GOES-HERE"
},
success: function(response) {
//console.log(response);
}
@reidransom
reidransom / gist:6033227
Last active April 4, 2024 14:31
Configure Zeroconf on FreeBSD

Configure Zeroconf on FreeBSD

Install avahi-app and nss_mdns. Note: avahi-app is chosen over avahi because avahi depends on X11.

$ cd /usr/ports/net/avahi-app
$ sudo make config-recursive
$ sudo make install clean
$ cd /usr/ports/dns/nss_mdns
$ sudo make config-recursive

$ sudo make install clean

@tuzz
tuzz / github.css
Last active March 5, 2024 17:18
Github Markdown Stylesheet
/*
Copyright (c) 2017 Chris Patuzzo
https://twitter.com/chrispatuzzo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: