Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Grant Ammons gammons

🏠
Working from home
View GitHub Profile
View clickbank-hook.php
<?php
// ConvertKit API Key:
$convertkitApiKey = 'your-convertkit-api-key';
// Map each of your Clickbank products to a ConvertKit tag ID, or leave this array empty to
// use the default tag for all products:
$convertkitTags = array(
'clickbankproduct1' => 'cktag1',
'clickbankproduct2' => 'cktag2',
'clickbankproduct3' => 'cktag3',
);
View config.md
hdmi_group=2
hdmi_mode=87
hdmi_cvt=800 480 60 6 0 0 0
View qemu-script.sh
#!/bin/bash
# to install ubuntu:
#-cdrom ubuntu-19.04-live-server-amd64.iso\
#-boot order=d\
printf -v macaddr "52:54:%02x:%02x:%02x:%02x" $(( $RANDOM & 0xff)) $(( $RANDOM & 0xff )) $(( $RANDOM & 0xff)) $(( $RANDOM & 0xff ))
# for a static mac address
# macaddr='52:54:be:36:42:a9'
View archiver.rb
require "fileutils"
class Archiver
DAYS_OLD_TO_AUTO_ARCHIVE = 20
DAYS_OLD_TO_AUTO_ARCHIVE_WHEN_READ = 7
def process!
count = 0
Dir.entries("./cur").each do |file|
View gist:22998e2494af75c78a5697d152b253ca
FrozenError:
can't modify frozen Array
# ./vendor/bundle/ruby/2.5.0/gems/actionpack-5.0.7.1/lib/action_dispatch/middleware/stack.rb:74:in `insert'
# ./vendor/bundle/ruby/2.5.0/gems/actionpack-5.0.7.1/lib/action_dispatch/middleware/stack.rb:74:in `insert'
# ./vendor/bundle/ruby/2.5.0/gems/actionpack-5.0.7.1/lib/action_dispatch/middleware/stack.rb:81:in `insert_after'
# ./vendor/bundle/ruby/2.5.0/gems/request_store-1.4.1/lib/request_store/railtie.rb:5:in `block in <class:Railtie>'
# ./vendor/bundle/ruby/2.5.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:30:in `instance_exec'
# ./vendor/bundle/ruby/2.5.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:30:in `run'
# ./vendor/bundle/ruby/2.5.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:55:in `block in run_initializers'
# ./vendor/bundle/ruby/2.5.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:54:in `run_initializers'
@gammons
gammons / infrastructure-engineer.md
Created Sep 25, 2018
ConvertKit infrastructure engineer position, formatted in Markdown.
View infrastructure-engineer.md

ConvertKit is on a mission to help creators earn $1B using our SaaS email marketing platform. We are 100% independent, 100% remote and are growing rapidly. We are proud to have built a product that our customers love, and we're looking for a talented infrastructure engineer to join our growing ops team.

Our infrastructure is very busy, processing millions of Sidekiq jobs a day, serving landing pages and forms for tens of thousands of creators, and delivering over 500 million emails per month. This role requires architecting fully automated cloud infrastructure while accelerating engineering productivity. We ship multiple times per day and continuously aim to improve deployment confidence and speed. Come join us to make our systems even more testable, scalable, secure and dependable!

Why ConvertKit is interesting:

  • We are a fully remote company, scattered across 8 states and 7 countries.
  • Bootstrapped, profitable, and growing quickly.
  • We put a high emphasis on
@gammons
gammons / engineer-position.md
Last active Sep 25, 2018
Rails engineer job listing for ConvertKit.com, formatted in Markdown.
View engineer-position.md

ConvertKit is on a mission to help creators earn $1B using our SaaS email marketing platform. We are 100% independent, 100% remote and are growing rapidly. We are proud to have built a product that our customers love, and we're looking to grow our engineering team by hiring more Rails engineers.

About the team

The engineers at ConvertKit are smart, highly motivated and highly productive developers who care greatly about the craft of coding. We champion learning, bettering ourselves, and teaching to the rest of the team.

About ConvertKit

  • We are a fully remote company, scattered across 8 states and 4 countries.
  • Bootstrapped, profitable, and growing quickly.
View cloud-config.yml
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDH1tPpIP17ZWCWOBHSGdSGO7pLMYjopkjOTs23Wu7gX0Im8hT18lX5AXRdADPiKK2y7Lzg4+20Qtgsv2RjbFTRmSoPvoMdzdU/ejvMXdAzPT8WVIkimzpUZ0BT6+f/raly89a3CVpWYl/Om3PMZOwQbsB3AaIpp5jlCEqWtxNedAxVOlz2kp8V5dNCmB2BwTIkIxjFzNaJQyFOcCTyZO14ehocKBMKpoUt2jU0YS4E2F/Zy9AhvRhmDGDJFaOz6QHRQc/o5gBq4azHUDnq8WByp7Gs+h6UQYZX3yEVm3sutuPaD5GK3MKZP3K9/ZhygSuP2jD9neN6kK7zRfaHMgBH gammons@gmail.com
View respin issue
./build.sh ubuntu-17.10.1-desktop-amd64.iso
[sudo] password for grant:
Extracting ISO ...
Parallel unsquashfs: Using 8 processors
141796 inodes (155219 blocks) to write
[============================================================================================-] 155219/155219 100%
created 112678 files
created 16840 directories
created 29085 symlinks
created 7 devices
@gammons
gammons / checkbox_example.html
Created Apr 26, 2018
How to use a checkbox with an existing form
View checkbox_example.html
<script src="http://localhost:3000/assets/CKJS4-dev.js?v="></script>
<div class="ck_form ck_minimal">
<div class="ck_form_fields">
<h3 class="ck_form_title">Join the newsletter</h3>
<div class="ck_description">
Subscribe to get our latest content by email.
</div>
<div id="ck_success_msg" style="display:none;">
<p>Success! Now check your email to confirm your subscription.</p>