Skip to content

Instantly share code, notes, and snippets.

--> Finished Dependency Resolution
Error: Package: libkadm5-1.15.1-50.el7.x86_64 (/libkadm5-1.15.1-50.el7.x86_64)
Requires: krb5-libs(x86-64) = 1.15.1-50.el7
Installed: krb5-libs-1.15.1-51.el7_9.x86_64 (@updates)
krb5-libs(x86-64) = 1.15.1-51.el7_9
Error: Package: glibc-headers-2.17-324.el7_9.x86_64 (/glibc-headers-2.17-324.el7_9.x86_64)
Requires: glibc = 2.17-324.el7_9
Installed: glibc-2.17-325.el7_9.x86_64 (installed)
glibc = 2.17-325.el7_9
Error: Package: expat-devel-2.1.0-12.el7.x86_64 (/expat-devel-2.1.0-12.el7.x86_64)
@robdimarco
robdimarco / example_instapage_integration.js
Last active January 17, 2019 17:39
Example instapage JS integration
/*
* Utility function to get the value of an HTTP parameter
*
* Common Usage:
*
* var utmTerm = getParameterByName('utm_term');
*
* @param name - The name of the HTTP parameter you would like to get
* @param url [OPTIONAL] - The URL to parse to get the parameter from. If unspecified,
* it will get the URL of the current page.
@robdimarco
robdimarco / instapage_success_helpers.js
Last active January 11, 2019 18:57
Useful functions for creating pixel firing
/*
* Utility function to get the value of an HTTP parameter
*
* Common Usage:
*
* var utmTerm = getParameterByName('utm_term');
*
* @param name - The name of the HTTP parameter you would like to get
* @param url [OPTIONAL] - The URL to parse to get the parameter from. If unspecified,
* it will get the URL of the current page.
@robdimarco
robdimarco / set.html
Last active December 17, 2018 02:58
Simple solver for the Set game.
<html>
<body>
<style>
h1 { text-align: center; }
</style>
<table>
<tbody>
<tr>
<td><img src="https://www.setgame.com/sites/all/modules/setgame_set/assets/images/new/1.png" /><h1>0</h1></td>
<td><img src="https://www.setgame.com/sites/all/modules/setgame_set/assets/images/new/2.png" /><h1>1</h1></td>
==> Reinstalling fishtown-analytics/dbt/dbt
==> Downloading https://files.pythonhosted.org/packages/5b/ba/67467678992aba725793c703fafd9e3f6cce6ae99c27b4f90ea006dad1d4/dbt-0.10.1.tar.gz
Already downloaded: /Users/rdimarco/Library/Caches/Homebrew/dbt-0.10.1.tar.gz
==> Downloading https://files.pythonhosted.org/packages/33/bc/fa0b5347139cd9564f0d44ebd2b147ac97c36b2403943dbee8a25fd74012/virtualenv-16.0.0.tar.gz
Already downloaded: /Users/rdimarco/Library/Caches/Homebrew/dbt--homebrew-virtualenv-16.0.0.tar.gz
==> python -c import setuptools... --no-user-cfg install --prefix=/private/tmp/dbt--homebrew-virtualenv-20180711-85613-tqnm29/target --single-version-externally-ma
==> python -s /private/tmp/dbt--homebrew-virtualenv-20180711-85613-tqnm29/target/bin/virtualenv -p python /usr/local/Cellar/dbt/0.10.1/libexec
==> Downloading https://files.pythonhosted.org/packages/d4/1c/99fb34c81c68012c71e8d35a1f16a6b25952322e23c911c81327c8464be8/agate-1.6.1.tar.gz
Already downloaded: /Users/rdimarco/Library/Caches/Homebrew/dbt--
2018-07-10 21:24:54 -0400
/usr/local/Cellar/dbt/0.10.1/libexec/bin/pip
install
-v
--no-deps
--no-binary
:all:
--ignore-installed
/private/tmp/dbt--PyYAML-20180710-60994-1jhqimv/PyYAML-3.12
### Keybase proof
I hereby claim:
* I am robdimarco on github.
* I am iotr (https://keybase.io/iotr) on keybase.
* I have a public key ASBwZs1sZCeWMuw5tKJUlypSntgNKrztsWUxd3rAa6d4_go
To claim this, I am signing this object:
@robdimarco
robdimarco / sidekiq_memory_killer.rb
Created August 5, 2017 12:48
Sidekiq Memory Killer
#!/usr/bin/env ruby
class SidekiqMemoryKiller
attr_accessor :restart_threshold
def initialize(restart_threshold: 90)
@restart_threshold = restart_threshold
end
def perform
log "!! No sidekiq process found!!" and return false \
require 'distribution';
def prob(n, p); Distribution::Normal.rng(n*p, (n*p*(1-p))**0.5).call / n; end
CREATE VIEW v_dynamic_pricing_for_accounts AS
SELECT
dynamic_pricing_bid_infos.account_id,
case
when 'red' = ANY(array_agg(dynamic_pricing_bid_infos.exclusive_lead_status))
then 'red'
when 'yellow' = ANY(array_agg(dynamic_pricing_bid_infos.exclusive_lead_status))
then 'yellow'
else 'green'
end exclusive_lead_status,