Skip to content

Instantly share code, notes, and snippets.

View boneskull's full-sized avatar
💀

Christopher Hiller boneskull

💀
View GitHub Profile
@ewxrjk
ewxrjk / gist:93808cdab43bcc5610519bd1f1a8c577
Last active January 15, 2021 12:39
FireTV pretending to be 192.168.49.1?
** Please do not post any more messages which amount to "I have the same issue" with no additional information.
** I get a notification for each one and it is just noise; knowing that one more person has the same issue does
** not help anyone. If these content-free comments continue to appear I will delete this gist to cut down on
** the noise. You have been warned.
Aug 21 20:02:57 sfere kernel: [107297.977252] IPv4: martian source 172.17.207.66 from 192.168.49.1, on dev br1
Aug 21 20:02:57 sfere kernel: [107297.981023] ll header: 00000000: 00 04 a7 05 ac 0c 84 d6 d0 91 67 b4 08 00 ..........g...
Aug 21 20:02:57 sfere kernel: [107298.729160] IPv4: martian source 172.17.207.66 from 192.168.49.1, on dev br1
Aug 21 20:02:57 sfere kernel: [107298.736326] ll header: 00000000: 00 04 a7 05 ac 0c 84 d6 d0 91 67 b4 08 00 ..........g...
Aug 21 20:02:58 sfere kernel: [107299.793616] IPv4: martian source 172.17.207.66 from 192.168.49.1, on dev br1
@stekan
stekan / imagemagick-resize-images.sh
Created August 2, 2016 07:19
Generate Images for srcset with ImageMagick
#!/bin/bash
## define image directory
DIR=.build/src/webroot/uploads
## define image sizes
sizes=(320 640 1280)
## imagemagick function
## convert $1(image) $2(width) $3(newname)
@njh
njh / house.example.net.conf
Created January 21, 2016 13:09
Proxying Node-Red through Nginx
server {
server_name house.example.net;
listen 1.2.3.4:80 default_server;
listen [2001:1234:ffff::1]:80 default_server;
add_header Cache-Control "public,max-age=31536000";
return 301 https://$server_name$request_uri;
}
map $ssl_client_s_dn $ssl_username {
@Vj3k0
Vj3k0 / .gitignore
Created January 4, 2016 11:32
Gitignore for Electron application development
#directories
bower_components
node_modules
dist
#files
*.tgz
*.log
@boneskull
boneskull / raspbian-setup-script.md
Last active August 21, 2017 22:17
raspbian setup script (jessie lite)

This is a note to myself about what I need to do to setup a Raspbian box.

  1. Username is pi and pw is raspberry. osmc/osmc if OSMC.
  2. apt-get update
  3. apt-get dist-upgrade -y
  4. apt-get install nfs-kernel-server openvpn software-properties-common vim git dnsutils -y
  • software-properties-common for adding PPAs
  1. apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 249AD24C
  • we can't use apt-add-repository because the Deluge PPA only has Ubuntu builds
  • key info is found here
@bakkot
bakkot / horrifying.js
Last active December 17, 2022 18:02
Various really bad JavaScript
(function x(){"use strict"; x = 1;}()); // TypeError
(function x(){x = 1; return x !== 1;}()); // write fails silently; function returns true
(function x(){"use strict"; x = (function(){throw 0;})();})() // Error 0
// These three lines rely on ES6.
(function x(){const x = 1;})() // No-op. In particular, not a redeclaration of x.
(function (){"use strict"; const x = 1; x = 2;})() // TypeError
(function (){const x = 1; x = 2;})() // TypeError. contrast (function x(){x = 2;}());
@jhen0409
jhen0409 / .babelrc
Last active November 15, 2015 17:40
Node 4.0.0 babel 5 blacklist
{
"stage": 0,
"blacklist": [
"es6.arrowFunctions",
"es6.blockScoping",
"es6.classes", // Don't black this if you are using ES7 classes features
"es6.forOf",
"es6.templateLiterals",
"es6.constants",
"es6.properties.computed",
@c9iim
c9iim / AXUIElement_in_Swift.swift
Last active May 9, 2023 07:45
AXUIElement in Swift
import Cocoa
protocol AXUIProtocol {
func AXUIWindowArray(processIdentifier pid:pid_t) -> [AXUIElement]
func AXUIWindowArray(bundleIdentifier bid:NSString) -> [AXUIElement]
}
extension AXUIProtocol {
func AXUIWindowArray(processIdentifier pid:pid_t) -> [AXUIElement] {
let windowList : UnsafeMutablePointer<AnyObject?> = UnsafeMutablePointer<AnyObject?>.alloc(1)
@ajfisher
ajfisher / 0x00000.bin
Last active October 10, 2021 00:51
ESP8266 Transparent bridge to J5
@LTGIV
LTGIV / ubuntu-mosquitto.yml
Last active July 5, 2021 05:42
Ansible playbook: install Mosquitto on Ubuntu (14.04 LTS) from PPA (alpha)
---
#
# Ansible playbook: install Mosquitto from PPA on Ubuntu v201502131346
# Louis T. Getterman IV (@LTGIV)
# www.GotGetLLC.com / www.opensour.cc
#
# Thanks to @jpmens for insight on cert locations ( https://twitter.com/jpmens/status/565513595644313600 )
#
# Example Usage:
# [user@host ~$] ansible-playbook /etc/ansible/playbooks/ubuntu-mosquitto.yml --extra-vars 'target=nameFromHostsFile'