This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
curl -s https://gist.githubusercontent.com/danielwestendorf/cda938b1ffb0a203ec3a415079d56efa/raw/a99d03110521fb3c1a21e0412614831a96b024ea/writebook-to-pdf > /tmp/writebook-to-pdf | |
docker run -d -p 5001:5001 --name breezy-pdf-lite -e "DEBUG=breezy-pdf-lite:*" -e "PORT=5001" -e "PRIVATE_TOKEN=YOURSUPERSECRETTOKEN" danielwestendorf/breezy-pdf-lite:latest | |
echo "Try: ruby /tmp/writebook-to-pdf export https://books.37signals.com/2/the-writebook-manual" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
rm log/development.log | |
rm log/test.log | |
yarn | |
bundle check || bundle install | |
docker compose up -d | |
if [ -f personal.Procfile ]; then | |
overmind start -f personal.Procfile -t 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TwilioVerification | |
include Singleton | |
class << self | |
delegate :create, :verify, to: :instance | |
end | |
def initialize | |
client = Twilio::REST::Client.new(ENV["TWILIO_ACCOUNT_SID"], ENV["TWILIO_AUTH_TOKEN"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<!-- Include Dexie --> | |
<script src="https://unpkg.com/dexie@latest/dist/dexie.js"></script> | |
<script> | |
// | |
// Define your database | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Create this file here: ./.git/hooks/pre-commit | |
# chmod +x ./.git/hooks/pre-commit | |
.git/hooks/pre-commit-format-js | |
.git/hooks/pre-commit-format-ruby |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --request POST \ | |
--url 'https://breezypdf.com/api/pdf/html' \ | |
--header 'Authorization: Bearer YOURKEYHERE' \ | |
--header 'content-type: multipart/form-data' \ | |
--form-string 'html_slug=<!DOCTYPE html><html><meta charset="UTF-8"><meta name="breezy-pdf-filename" content="myfilename.pdf"><body><h1>Hello from BreezyPDF 👍</h1><script src="https://twemoji.maxcdn.com/v/latest/twemoji.min.js" crossorigin="anonymous"></script><script type="text/javascript">twemoji.parse(document.body)</script></body></html>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# spec/rails_helper.rb | |
RSpec.configure do |config| | |
... | |
config.include TurbolinkNav, type: :system | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Export a Google Sheet cell which is JSON into columns in the sheet | |
Expects row 1 to define headers for the sheet | |
given the following table | |
| A | B | |
------------------------------------------- | |
1|name|data | |
------------------------------------------- | |
2|Bob|{"foo": "bar", "baz": {"eeh": "ahh"}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
setTimeout(function() { | |
window.location = 'https://hoalife.com/traits-of-good-board-members/'; | |
}, 1000) | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install bash-preexec | |
# curl https://raw.githubusercontent.com/rcaloras/bash-preexec/master/bash-preexec.sh -o ~/.bash-preexec.sh | |
# Add this (or source it) from your ~/.bashrc | |
[ -n "$PS1" ] && source ~/.bash-preexec.sh | |
preexec() { | |
if echo "$1" | grep -q -E "prod|ssh" ; then | |
echo -e "\033]50;SetProfile=Prod\a" # iTerm2 profile change, call AS or other here | |
fi |
NewerOlder