Skip to content

Instantly share code, notes, and snippets.

Jay Janssen jayjanssen

Block or report user

Report or block jayjanssen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jayjanssen
jayjanssen / convox.yml
Last active Nov 26, 2019
Shared local rack resources for Convox gen2
View convox.yml
# NOT FOR PRODUCTION, JUST FOR LOCAL RACKS!!!!!
# I use this convox.yml to setup local gen2 rack services.
# NOT for apps that have their own resources defined, these are resources are shared across multiple apps
# In production, these are either non-convox SaaS (e.g., I use Elastic cloud for my prod elasticsearch)
# *or* I set them up with `convox resources create` (e.g., my shared redis)
# This config is just a handy way to have local dev services running that my local convox rack can use.
resources:
# Any resources here exposed locally as <resourcename>.resource.<appname>.convox
redis:
type: redis
View keybase.md

Keybase proof

I hereby claim:

  • I am jayjanssen on github.
  • I am perconajayj (https://keybase.io/perconajayj) on keybase.
  • I have a public key ASD73ASV9xg29hDRfIRC_K8LFE6ilm4-ylbyr2C3d3moVAo

To claim this, I am signing this object:

View gist:3658a7a8abc44ff15029e56e4ae964c3
testschedule:
build: .
command: "tail -f /dev/null"
labels:
- convox.cron.myjob=* * * * ? echo "Hello"; sleep 120; echo "slept"
- convox.cron.secondjob=[26,27,28] * * * ? echo "Hello 2"
- convox.cron.thirdjob=*/2 * * * ? echo "Hello 3"
View gist:e0acbebef60215f3bb5cd181d38f27fe
sqs:
image: lightspeedretail/fake-sqs
environment:
- LINK_SCHEME=http
- LINK_PASSWORD=test
- LINK_USERNAME=test
- LINK_PATH=/queue/default
ports:
- 9324
View gist:e6b309218cc452cb8df5fc9bd78b851d
#!/usr/bin/env iced
mysqlx = require('mysqlx')
# Connect to server on localhost
await mysqlx.getSession {
host: 'mysql57.docker', port: '33060',
dbUser: 'root', dbPassword: 'root'
}
.then defer session
@jayjanssen
jayjanssen / glacier_inc.pl
Created Dec 24, 2015
ZFS full/incrementals to AWS Glacier
View glacier_inc.pl
#!/usr/bin/perl
use vars qw/ @ARGV /;
local $ENV{PATH} = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";
die "Usage: $0 <filesystem>\n" unless $#ARGV == 0;
my $filesystem = shift @ARGV;
my $base_snap = '@glacier';
@jayjanssen
jayjanssen / gist:8e74bc4c5bdefc880ffd
Last active Apr 10, 2019
Golang MySQL connection with multiple IPs and connection timeouts
View gist:8e74bc4c5bdefc880ffd
package main
import (
"database/sql"
"fmt"
"github.com/go-sql-driver/mysql"
"log"
"net/http"
"strings"
"time"
@jayjanssen
jayjanssen / gist:8ee0659dc0618ba60268
Created Jul 15, 2015
Can I read the gcache mmap?
View gist:8ee0659dc0618ba60268
package main
import "github.com/riobard/go-mmap"
import "fmt"
import "os"
func main() {
file, err := os.Open( "/gcache/galera.cache")
if err != nil {
panic( err )
@jayjanssen
jayjanssen / gist:bcdc33f8ae52f4ecfa69
Created Jul 10, 2015
MaxScale + PXC with RW splitting
View gist:bcdc33f8ae52f4ecfa69
[maxscale]
threads=4
[PXC Monitor]
type=monitor
module=galeramon
servers=node1,node2,node3
user=maxscale
passwd=maxscale
monitor_interval=1000
View gist:1d1edde1541864a5e9c4
select engine, table_schema, table_name from information_schema.TABLES
WHERE table_schema NOT IN ('performance_schema','information_schema','mysql')
and engine != 'Innodb';
select table_schema, engine, count(*) as non_innodb_tables from information_schema.TABLES where table_schema NOT IN ('performance_schema','information_schema','mysql')
and engine != 'Innodb' group by table_schema, engine with rollup;
You can’t perform that action at this time.