Skip to content

Instantly share code, notes, and snippets.

View ejdyksen's full-sized avatar
😎

E.J. Dyksen ejdyksen

😎
View GitHub Profile
require 'sinatra'
require 'openssl'
require 'json'
post '/' do
body = request.body.read
puts "Time : #{Time.now}"
puts "Actual Signature : #{request.env['HTTP_X_CHARGIFY_WEBHOOK_SIGNATURE_HMAC_SHA_256']}"
puts "Computed Signature: #{signature(body)}"
#!/usr/bin/env bash
uninstall() {
list=`gem list --no-versions`
for gem in $list; do
gem uninstall $gem -aIx
done
gem list
gem install bundler
}
@ejdyksen
ejdyksen / patch-edid.md
Last active April 6, 2024 15:59
A script to fix EDID problems on external monitors in macOS

patch-edid.rb

A script to fix EDID problems on external monitors in macOS.

Instructions

  1. Connect only the problem display.

  2. Create this directory structure (if it doesn't already exist):

@ejdyksen
ejdyksen / gist:c60e1aa1e4934ff32c36
Created October 28, 2014 19:19
LaunchAgent plist for Chrome Kiosk mode
<?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">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.mutuallyhuman.radiator</string>
<key>Program</key>
<string>/Applications/Google Chrome.app/Contents/MacOS/Google Chrome</string>
<key>ProgramArguments</key>
<array>
@ejdyksen
ejdyksen / gist:dabee71e633c5b7df6e1
Created January 13, 2015 18:45
openssl commands
# Generate a CSR and unencrypted private key
openssl req -out CSR.csr -new -newkey rsa:2048 -nodes -keyout privateKey.key
@ejdyksen
ejdyksen / gist:53bfdaa72d9fba1644cc
Created January 20, 2015 21:24
Angular on S3 rewrite rules
<RoutingRules>
<RoutingRule>
<Condition>
<HttpErrorCodeReturnedEquals>403</HttpErrorCodeReturnedEquals>
</Condition>
<Redirect>
<HostName>example.com</HostName>
<ReplaceKeyPrefixWith>#/</ReplaceKeyPrefixWith>
<HttpRedirectCode>302</HttpRedirectCode>
</Redirect>
@ejdyksen
ejdyksen / gist:cb0fcffd6c4b71b6c470
Last active August 29, 2015 14:21
improv leadership email
From: E.J. Dyksen
Date: Fri 5/4/2007 2:53 AM
Subject: IMPROV leadership

I am sending this email to the entire team in the interest of transparency and openness in this matter. I think everyone should read it.

Hello soon-to-be-juniors of IMPROV!

let notificationCenter = NSUserNotificationCenter.defaultUserNotificationCenter()
let notification = NSUserNotification()
notification.title = "Hello"
notification.informativeText = "This is a test"
notification.soundName = NSUserNotificationDefaultSoundName
notification.userInfo = ["key": "value"]
notificationCenter.deliverNotification(notification)
@ejdyksen
ejdyksen / arq5.md
Last active April 12, 2016 14:04
mirror of Arq 5 blog post

Arq 5: Massively faster backup and restore

Today we released Arq 5, and we’re really excited about it! We implemented a bunch of the most-requested features, and we worked hard on improving the performance.

Big Price Change

With Arq 5 we’re switching from per-computer licenses to per-user licenses! Buy one license and use it on all your Macs and PCs!

Way Faster

Arq 5 is faster in several ways:

@ejdyksen
ejdyksen / http-test.rb
Last active August 6, 2020 15:02
A simple script to test if a website is responding to HTTP requests
#!/usr/bin/env ruby
loop do
good = 0
bad = 0
for i in 1..100 do
result = system("curl -sS https://www.google.com/ > /dev/null 2> /dev/null")
if result then