Skip to content

Instantly share code, notes, and snippets.

@jed
jed / how-to-set-up-stress-free-ssl-on-os-x.md
Last active February 27, 2025 16:31
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

@stormzhang
stormzhang / adbwifi.sh
Created August 28, 2014 00:52
shell script for adb wifi
#!/bin/bash
#Modify this with your IP range
MY_IP_RANGE="192\.168\.1"
#You usually wouldn't have to modify this
PORT_BASE=5555
#List the devices on the screen for your viewing pleasure
adb devices
@vbajpai
vbajpai / gist:55091f8a066717bce9c4
Last active November 27, 2024 04:33
OpenWrt Routed AP configuration
OpenWrt:/etc/config$ cat network
...
config interface 'lan'
option ifname 'eth0'
option type 'bridge'
option proto 'dhcp'
config interface 'wwan'
option proto 'static'

Mac from scratch

Install Software

Install from App Store

Install from Third-Party Websites

@maxfenton
maxfenton / macos_defaults.md
Last active November 8, 2023 23:57
Mac system defaults tricks

System stuff for a mac

What the defaults do and how to undo them

Dropshadows on screenshots

defaults write com.apple.screencapture disable-shadow -bool true
killall SystemUIServer
; save to profile.ini
[Main]
Env = 1.4.9.3 - 2.0.50727.3053.Microsoft Windows NT 5.1.2600 Service Pack 2
Target = Windows XP Professional SP3 - 5.1.2600.5512 - English (United States)
[Tasks]
Service Pack Integration
Remove Components
Unattended Setup
Integrate Drivers
@derhuerst
derhuerst / intro.md
Last active November 27, 2024 06:01
Installing the Z Shell (zsh) on Linux, Mac OS X and Windows

Installing zsh – the easy way

The Z shell (zsh) is a Unix shell [...]. Zsh can be thought of as an extended Bourne shell with a large number of improvements, including some features of bash, ksh, and tcsh.

Z shell – Wikipedia

Read more about ZSH at An Introduction to the Z Shell.

Choose one of the following options.

@protrolium
protrolium / ffmpeg.md
Last active July 19, 2025 15:39
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@zburgermeiszter
zburgermeiszter / hddled.sh
Created June 22, 2015 11:09
HDD led on Scroll Lock
#!/bin/bash
# Check interval seconds
CHECKINTERVAL=0.05
# console
CONSOLE=/dev/console
#indicator to use [caps, num, scroll]
INDICATOR=scroll
@fnky
fnky / README.md
Last active June 21, 2023 16:50
Activate the power chime sound effect. For MacBook Pro and MacBook Air

Power Chime

To activate the sound effect

$ defaults write com.apple.PowerChime ChimeOnAllHardware -bool true; open /System/Library/CoreServices/PowerChime.app &

Do deactivate it, simply change the ChimeOnAllHardware boolean to false.