Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan Pendergast rynop

View GitHub Profile
@rynop
rynop / export.sh
Last active Feb 11, 2021
Clone WAF IP Set
View export.sh
# 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 Jan 29, 2021
Command to clone elastic beanstalk environment variables
View cmds.sh
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 Dec 5, 2020
Software school prep
View TODO.md

VS Code

  1. Test
  2. Test2
View error.log
$ 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 Jul 24, 2019
S2: get bounding box of center point (in degrees) and radius
View main.go
package main
import (
"fmt"
"math"
"strconv"
"github.com/golang/geo/s2"
)
View bank_clean.27f01fbbdf43271788427f3682996ae29ceca05d.csv
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 Feb 6, 2019
Schedule Spreadsheet
View schedule.csv
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 Feb 7, 2019
External event data specification. All fields required unless noted.
View events.json
{
"name": "Squirt B schedule",
"from": {
"name":"Betsy",
"email":"NES@shiftcals.com"
},
"to":["email1@shiftcals.com","email2@shiftcals.com"]
"timezoneLocation": "America/Chicago",
// eventMappings are Optional if you choose to define events via 'Option 1' below
"eventMappings": [
@rynop
rynop / fa.html
Created Dec 28, 2018
Font Awesome Solid icon
View fa.html
<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 Dec 28, 2018
standard FA icon
View tabs.xml
<TabView androidTabsPosition="bottom" class="fas h2 m-x-auto" selectedTabTextColor="green">
<page-router-outlet
*tabItem="{title: '&#xf2bb;'}"
name="browseTab">
</page-router-outlet>
</TabView>