Skip to content

Instantly share code, notes, and snippets.

View rynop's full-sized avatar

Ryan Pendergast rynop

View GitHub Profile
@rynop
rynop / export.sh
Last active February 11, 2021 15:42
Clone WAF IP Set
# This example exports a regional rule, targeted for importing into cloudfront
aws wafv2 get-ip-set --scope REGIONAL --output=json --name=my-ip-set --id foo | jq -c '.IPSet | del(.Id,.ARN) + {Scope: "CLOUDFRONT"}' > my-ip-set.json
@rynop
rynop / cmds.sh
Created January 29, 2021 17:43
Command to clone elastic beanstalk environment variables
eb printenv guilded-server-dev | tr '\n' ' ' | sed 's/Environment Variables:/ /g' | sed 's/ */ /g' | sed 's/ = /=/g' > /tmp/envvars.txt
# Make sure /tmp/envvars.txt looks good
# see https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-setenv.html
pbcopy < /tmp/envvars.txt
eb setenv -e eb-env-name<paste>
@rynop
rynop / TODO.md
Created December 5, 2020 18:56
Software school prep

VS Code

  1. Test
  2. Test2
@rynop
rynop / error.log
Last active November 6, 2019 04:09
error
$ magick front.jpg -fuzz 2% -fill none -draw "matte 0,0 floodfill" -channel alpha -blur 0x2 -level 50x100% +channel front.png
magick: non-conforming drawing primitive definition `0' @ error/draw.c/RenderMVGContent/4406.
$ magick --version
Version: ImageMagick 7.0.8-68 Q16 x86_64 2019-10-07 https://imagemagick.org
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP(3.1)
Delegates (built-in): bzlib freetype heic jng jp2 jpeg lcms ltdl lzma openexr png tiff webp xml zlib
@rynop
rynop / main.go
Last active July 24, 2019 18:38
S2: get bounding box of center point (in degrees) and radius
package main
import (
"fmt"
"math"
"strconv"
"github.com/golang/geo/s2"
)
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 62 columns, instead of 17 in line 2.
id,age,campaign,pdays,previous,no_previous_contact,not_working,job_admin.,job_blue-collar,job_entrepreneur,job_housemaid,job_management,job_retired,job_self-employed,job_services,job_student,job_technician,job_unemployed,job_unknown,marital_divorced,marital_married,marital_single,marital_unknown,education_basic.4y,education_basic.6y,education_basic.9y,education_high.school,education_illiterate,education_professional.course,education_university.degree,education_unknown,default_no,default_unknown,default_yes,housing_no,housing_unknown,housing_yes,loan_no,loan_unknown,loan_yes,contact_cellular,contact_telephone,month_apr,month_aug,month_dec,month_jul,month_jun,month_mar,month_may,month_nov,month_oct,month_sep,day_of_week_fri,day_of_week_mon,day_of_week_thu,day_of_week_tue,day_of_week_wed,poutcome_failure,poutcome_nonexistent,poutcome_success,y_no,y_yes
0,56,1,999,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,1,0
1,57,1,999,0,1,0,0,0,0,0,0,0,0,1,0,
@rynop
rynop / schedule.csv
Last active February 6, 2019 16:56
Schedule Spreadsheet
Work Date (Ex:3/27/19)* Shift Code* Summary Location Description/Notes
03/27/19 D Basic training 1234 taco building Rochester, MN 55902 Bring paper and pencil
@rynop
rynop / events.json
Last active February 7, 2019 17:11
External event data specification. All fields required unless noted.
{
"name": "Squirt B schedule",
"from": {
"name":"Betsy",
"email":"[email protected]"
},
"to":["[email protected]","[email protected]"]
"timezoneLocation": "America/Chicago",
// eventMappings are Optional if you choose to define events via 'Option 1' below
"eventMappings": [
@rynop
rynop / fa.html
Created December 28, 2018 03:45
Font Awesome Solid icon
<TabView androidTabsPosition="bottom" class="fas h2 m-x-auto" selectedTabTextColor="green">
<page-router-outlet
*tabItem="{title: '&#xf2bb;'}"
name="browseTab">
</page-router-outlet>
</TabView>
@rynop
rynop / tabs.xml
Created December 28, 2018 03:40
standard FA icon
<TabView androidTabsPosition="bottom" class="fas h2 m-x-auto" selectedTabTextColor="green">
<page-router-outlet
*tabItem="{title: '&#xf2bb;'}"
name="browseTab">
</page-router-outlet>
</TabView>