Skip to content

Instantly share code, notes, and snippets.

@inntran
inntran / routeros-install-moz-root-ca.md
Created January 4, 2018 18:13
Install latest Mozilla trusted CA certificates on Mikrotik RouterOS

Steps

  1. Get latest CA certificates from Mozilla: https://ccadb-public.secure.force.com/mozilla/IncludedCACertificateReportPEMCSV
  2. Extract PEM format certificates from CSV, using this tool I wrote: https://github.com/inntran/RubyPowerTools/blob/master/bin/csv or DIY ./csv IncludedCACertificateWithPEMReport.csv "PEM Info" > moz-cert-$(date +%Y%m%d).crt
  3. Upload/Copy generated bundle certificate file to RouterOS
  4. Import using command /certificate import file-name=moz-cert-20180101.crt, should replace 20180101 with actual filename.
@inntran
inntran / DisplayVendorID-1e6d.xml
Created June 10, 2017 07:45
LG 27EA83 computer monitor EDID for newer Macs
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Location: /System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-1e6d/ ,remove .xml from filename -->
<!-- Need to use csrutil to disable before copying this file to desination.-->
<plist version="1.0">
<dict>
<key>DisplayProductName</key>
<string>27EA83 - forced RGB mode (EDID override)</string>
<key>IODisplayEDID</key>
<data>AP///////wAebXlZAQEBATAWAQSlPCJ4hh3xrk81syUNUFSlS4BxT4GAgY+p
@inntran
inntran / ruby_upgrade.sh
Created December 18, 2012 05:08
Upgrade Ruby on AWS instances. Applied falcon patch. Root required.
#!/bin/bash
export PATH=/usr/local/bin:$PATH
RUBY_VER="1.9.3-p327"
NGINX_VER="1.2.6"
# 1. Create archive of /usr/local
tar --transform='s,usr/local/,,' -cvf /root/ruby_old_pack.tar /usr/local
# 2. Delete contents in /usr/local
rm -rf /usr/local/*