Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
peak awesomeness imminent

Bryan Casey TheCase

💭
peak awesomeness imminent
View GitHub Profile
@TheCase
TheCase / maddy_config_bundle.ini
Created Oct 16, 2017
Slic3r bundle for Maddy Mendel Max
View maddy_config_bundle.ini
# generated by Slic3r 1.2.9 on Sat May 21 11:38:50 2016
[filament:faberdashery]
bed_temperature = 65
bridge_fan_speed = 100
cooling = 1
disable_fan_first_layers = 2
extrusion_multiplier = 1
fan_always_on = 0
fan_below_layer_time = 60
View javascript.js
$(document).ready(function() {
$('#list-users-button').click(function(){
$.getJSON('https://jsonplaceholder.typicode.com/users',
function (data) {
//console.log("> ", data);
$("#list-results-table tbody").append("<table>");
for ($i=0; $i < data.length; $i++){
$("#list-results-table tbody").append('<tr><td>' + data[$i].name + '</td></tr>');
@TheCase
TheCase / dmesg
Created Mar 5, 2018
raspi after boot
View dmesg
[ 2.766152] usb 1-1.4: new low-speed USB device number 5 using dwc_otg
[ 2.910606] usb 1-1.4: New USB device found, idVendor=1241, idProduct=1111
[ 2.910617] usb 1-1.4: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 2.916233] fuse init (API version 7.26)
[ 2.932977] input: HID 1241:1111 as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/0003:1241:1111.0001/input/input0
[ 2.952501] hid-generic 0003:1241:1111.0001: input,hidraw0: USB HID v1.00 Mouse [HID 1241:1111] on usb-3f980000.usb-1.4/input0
View dev-input
pi@retropi:/dev/input $ tree /dev/input/
/dev/input/
|-- by-id
| |-- usb-1241_1111-event-mouse -> ../event7
| |-- usb-1241_1111-mouse -> ../mouse0
| |-- usb-Apple_Inc._Apple_Keyboard-event-if01 -> ../event6
| |-- usb-Apple_Inc._Apple_Keyboard-event-kbd -> ../event5
| |-- usb-XGaming_X-Arcade-event-kbd -> ../event0
| `-- usb-XGaming_X-Arcade-if01-event-kbd -> ../event1
|-- by-path
@TheCase
TheCase / filebeats-remove_ansi_coloring.yaml
Last active Feb 4, 2020
Filbeats - remove ansi control characters for colored logs
View filebeats-remove_ansi_coloring.yaml
- script:
when:
regexp:
message: "[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]"
lang: javascript
id: remove_ansi_color
source: >
function process(event) {
var msg = event.Get("message")
var regex = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g
@TheCase
TheCase / update_synology_certificates.yaml
Last active Jan 31, 2021
Ansible task to update synology SSL certificates
View update_synology_certificates.yaml
- name: set directories
set_fact:
sys_dir: /usr/syno/etc/certificate
pkg_dir: /usr/local/etc/certificate
stg_dir: /tmp/certs
- name: create cert staging directory
file:
path: "{{ stg_dir }}"
state: directory
@TheCase
TheCase / get_pfsense_certificates.yaml
Created Jan 31, 2021
Ansible task to fetch Acme certs from pfSense
View get_pfsense_certificates.yaml
# requires domain_name variable
- name: get certs
fetch:
src: "/conf/acme/{{ item }}"
dest: ../.certs/
flat: yes
with_items:
- "{{ domain_name }}.fullchain"
- "{{ domain_name }}.ca"
- "{{ domain_name }}.key"