Skip to content

Instantly share code, notes, and snippets.

View porkcharsui's full-sized avatar

Derek Ellis porkcharsui

View GitHub Profile
@clemensg
clemensg / etc_sysctl.conf
Created February 5, 2014 16:50
My FreeBSD /etc/sysctl.conf
# /etc/sysctl.conf
# Clemens Gruber, 2014
#
# Uncomment this to prevent users from seeing information about processes that
# are being run under another UID.
security.bsd.see_other_uids=0
## I/O
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active May 20, 2025 13:11
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@chengyin
chengyin / linkedout.js
Last active July 11, 2021 15:23
Unsubscribe all LinkedIn email in "one click". For an easier to use version, you can check out the bookmarklet: http://chengyin.github.io/linkedin-unsubscribed/
// 1. Go to page https://www.linkedin.com/settings/email-frequency
// 2. You may need to login
// 3. Open JS console
// ([How to?](http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers))
// 4. Copy the following code in and execute
// 5. No more emails
//
// Bookmarklet version:
// http://chengyin.github.io/linkedin-unsubscribed/
@danguita
danguita / osx-development-setup.md
Last active June 2, 2016 13:37
Set up your shiny OSX for development
require 'rubygems'
require 'mechanize'
FIRST_NAME = 'FIRST_NAME'
LAST_NAME = 'LAST_NAME'
PHONE = 'PHONE'
EMAIL = '[email protected]'
PARTY_SIZE = 2
SCHEDULE_RANGE = { :start_time => '19:00', :end_time => '20:30' }
@dctrwatson
dctrwatson / nginx.conf
Last active September 5, 2025 04:10
Caching PyPi packages locally with nginx
user www-data;
worker_processes 4;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
@willurd
willurd / web-servers.md
Last active November 18, 2025 14:46
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@geek
geek / install.md
Last active December 1, 2020 12:30
Installing and running SmartOS on OSX with VirtualBox
@jshaw
jshaw / byobuCommands
Last active November 14, 2025 07:25
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
@prasincs
prasincs / foscam_docs.md
Last active June 10, 2023 08:54
FOSCAM Documentation

Adapted from http://www.digitalham.co.uk/web/development/embedding-cctv/ipcam-cgi-sdk/

AFAIK, everything is based on the CGI scripts below, there might be ways to get the streams but I believe it's doable without hacking the firmware and stuff. All functions should be accessible via GET and POST methods.

ACL groups:visitor、operator and Administrator.

Upgrade_firmware.cgi and upgrade_htmls.cgi only support post method,others cgi only support get method.

next_url: