Skip to content

Instantly share code, notes, and snippets.

@thenoseman
thenoseman / openssh-build-static.sh
Created December 23, 2018 11:07 — forked from fumiyas/openssh-build-static.sh
Build OpenSSH with static linked zlib and OpenSSL libraries
#!/bin/sh
set -u
set -e
umask 0077
prefix="/opt/openssh"
top="$(pwd)"
root="$top/root"
build="$top/build"
@thenoseman
thenoseman / openssh-build-static.sh
Created December 23, 2018 11:07 — forked from fumiyas/openssh-build-static.sh
Build OpenSSH with static linked zlib and OpenSSL libraries
#!/bin/sh
set -u
set -e
umask 0077
prefix="/opt/openssh"
top="$(pwd)"
root="$top/root"
build="$top/build"

Installing libcurl with Updated OpenSSL Support

If your Linux distribution is so out of date that you can no longer install updated patches, you'll typically need to either reach for an unsupported package or install the software via source. Additionally, I didn't want to interfere with installed software in fear of rendering the system unusable.

Become Root and Grab Tarballs

You're going to be installing stuff that requires root access, so it's easier to just be able to do it when you want without having to worry about using sudo and permissions. Be careful you don't delete anything you can't recover

$ sudo su - 
@thenoseman
thenoseman / patch-edid.rb
Created October 28, 2015 19:44 — forked from adaugherity/patch-edid.rb
Generate a patched monitor definition file with forced RGB. Might solve display resolution issues for external monitors on macbooks
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten

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

#!/bin/bash
#
# Based on: http://imaginationunbound.blogspot.com/2007/12/adobe-photoshop-cs3-on-mac-os-x-case.html
# Instructions for use
# 1. Copy Photoshop CS5 from a case-insensitive install by copying these folders:
# a) "old_disk_image/Library/Application Support/Adobe" to "/Library/Application Support/Adobe
# b) "old_disk_image/Library/Application Support/FLEXnet Publisher" to "/Library/Application Support/FLEXnet Publisher
# c) "old_disk_image/Library/ScriptingAdditions/Adobe Unit Types.osax" to "/Library/ScriptingAdditions/Adobe Unit Types.osax
# d) "old_disk_image/Applications/Adobe Photoshop CS5" to "/Applications/Adobe Photoshop CS5"
# 2. Run the script below to rename all the folders Adobe's programmers where too lazy to name correctly.
def write_backtrace name, backtrace, filename
exceptions = Regexp.union([
/\.bundle/,
/spec/,
/test/,
/lib\/ruby\/1.9.1/
])
backtrace.reject! { |line| line =~ exceptions }
@thenoseman
thenoseman / .vimrc
Created September 13, 2012 20:05 — forked from c9s/.vimrc
fun! EvalVimScriptRegion(s,e)
let lines = getline(a:s,a:e)
let file = tempname()
cal writefile(lines,file)
redir @e
silent exec ':source '.file
cal delete(file)
redraw
redir END
echo "Region evaluated."
@thenoseman
thenoseman / 0-readme.md
Created June 12, 2012 07:37 — forked from sj26/0-readme.md
ruby-1.9.3-p194 cumulative performance patch.

Patched ruby 1.9.3-p194 for 30% faster rails boot

What is?

This script installs a patched version of ruby 1.9.3-p194 with patches for boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.

Huge thanks to funny-falcon for the performance patches.

@thenoseman
thenoseman / Gemfile
Created September 16, 2011 18:16 — forked from chriseppstein/readme.md
How to integrate Compass with Rails 3.1 asset pipeline
group :assets do
gem 'sass-rails', '~> 3.1.0'
gem 'coffee-rails', '~> 3.1.0'
gem 'uglifier'
gem 'compass', '~> 0.12.alpha'
# include other compass plugins here. E.g.:
gem 'compass-susy-plugin', :require => 'susy'
end