Skip to content

Instantly share code, notes, and snippets.

@prologic
prologic / LearnGoIn5mins.md
Last active November 5, 2024 02:14
Learn Go in ~5mins
@mbierman
mbierman / reboot.sh
Last active March 6, 2024 06:31
Restart Homebridge
#!/bin/bash
# v 2.7
# https://gist.github.com/mbierman/dd45821b53d5d22147cef217f0c0fe95
# Variables
update="false"
reboot="false"
hostname=$(hostname)
docker="/.dockerenv"
#!/bin/bash
# Copyright (c) <2018> <Maksym Rusynyk>
#
# 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:
#
@SaraVieira
SaraVieira / gist file.md
Last active December 5, 2023 11:59
The Origin of Furries

In this talk we will be all discussing the origin of the furry fandom. How we will thogheter create a new furry-in-js framework. We will going over how they have changed the current fandom world, our hearts and the js world in 5 very awesome minutes! This talk is to prove a point that stars mean nothing in this case.

https://reactiveconf.com/

@zkat
zkat / index.js
Last active September 26, 2024 10:33
npx is cool
#!/usr/bin/env node
console.log('yay gist')
@cabeca
cabeca / simulator_populator_xcode7
Last active April 16, 2020 09:18
This script removes and recreates all simulators in Xcode 7.
#!/usr/bin/env ruby
require 'JSON'
device_types = JSON.parse `xcrun simctl list -j devicetypes`
runtimes = JSON.parse `xcrun simctl list -j runtimes`
devices = JSON.parse `xcrun simctl list -j devices`
devices['devices'].each do |runtime, runtime_devices|
runtime_devices.each do |device|
@tjbenton
tjbenton / has_events.js
Created August 12, 2015 20:32
Utility to list out elements that have event listeners. Their listeners will be listed out in the console.
/// @name has_events
/// @author Tyler Benton
/// @description
/// Utility to list out elements that have event listeners. Their listeners will be listed out in the console.
/// @arg {string} target ["*"]
/// @note {10} - Only works if you copy this code and paste it in the chrome console.
/// @markup {js}
/// has_events(); // lists out all elements
/// has_events("a"); // lists out all anchor tags that have event listeners
function has_events(target){
@brock
brock / lock.scpt
Created January 19, 2015 16:46
AppleScripts to lock and unlock a macbook
tell application "System Events"
tell security preferences
set require password to wake to true
end tell
end tell
activate application "ScreenSaverEngine"
@ZevEisenberg
ZevEisenberg / resetAllSimulators.sh
Last active September 15, 2024 02:52
Reset all iOS simulators with this one weird trick
osascript -e 'tell application "iOS Simulator" to quit'
osascript -e 'tell application "Simulator" to quit'
xcrun simctl erase all
@zenparsing
zenparsing / dedent-template.js
Last active April 25, 2023 22:16
Dedenting Template Strings
function dedent(callSite, ...args) {
function format(str) {
let size = -1;
return str.replace(/\n(\s+)/g, (m, m1) => {
if (size < 0)
size = m1.replace(/\t/g, " ").length;