Skip to content

Instantly share code, notes, and snippets.

View scarolan's full-sized avatar
🤸‍♂️
In whatever position one is in...one must find balance. -BKS Iyengar

Sean Carolan scarolan

🤸‍♂️
In whatever position one is in...one must find balance. -BKS Iyengar
View GitHub Profile
@scarolan
scarolan / index.html
Created March 1, 2022 15:23 — forked from arosenkranz/index.html
CSS Lightbox
<a href="#unique-id-of-image">
<img alt="alt text" src="../assets/filename.png" />
</a>
<a href="#" class="lightbox" id="unique-id-value">
<img alt="alt text" src="../assets/filename.png" />
</a>
url - https://aws.amazon.com/blogs/security/a-safer-way-to-distribute-aws-credentials-to-ec2/
Finding hard-coded credentials in your code
Hopefully you’re excited about deploying credentials to EC2 that are automatically rotated. Now that you’re using Roles, a good security practice would be to go through your code and remove any references to AKID/Secret. We suggest running the following regular expressions against your code base:
Search for access key IDs: (?<![A-Z0-9])[A-Z0-9]{20}(?![A-Z0-9]). In English, this regular expression says: Find me 20-character, uppercase, alphanumeric strings that don’t have any uppercase, alphanumeric characters immediately before or after.
Search for secret access keys: (?<![A-Za-z0-9/+=])[A-Za-z0-9/+=]{40}(?![A-Za-z0-9/+=]). In English, this regular expression says: Find me 40-character, base-64 strings that don’t have any base 64 characters immediately before or after.
If grep is your preferred tool, run a recursive, Perl-compatible search using the following commands
@scarolan
scarolan / pangrams
Created July 30, 2018 22:53 — forked from huyhong/pangrams
List of Pangrams
Nymphs blitz quick vex dwarf jog. (27 letters)
DJs flock by when MTV ax quiz prog. (27 letters) (2 acronyms and a US spelling)
Big fjords vex quick waltz nymph. (27 letters)
Bawds jog, flick quartz, vex nymph. (27 letters)
Junk MTV quiz graced by fox whelps. (28 letters) (Includes proper noun)
Bawds jog, flick quartz, vex nymphs. (28 letters)
Waltz, bad nymph, for quick jigs vex! (28 letters)
Fox nymphs grab quick-jived waltz. (28 letters)
Brick quiz whangs jumpy veldt fox. (28 letters)
Glib jocks quiz nymph to vex dwarf. (28 letters)
@scarolan
scarolan / emojis.json
Created April 3, 2018 15:37 — forked from oliveratgithub/emojis.json
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family_mothers_two_girls", "shortname": "", "unicode": "", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128103;", "category": "p", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family_mothers_children", "shortname": "", "unicode": "", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128102;", "category": "p", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family_mothers_two_boys", "shortname": "", "unicode": "", "html": "&#128105;&zwj;&#128105;&zwj;&#128102;&zwj;&#128102;", "category": "p", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family_two_girls", "shortname": "", "unicode": "", "html": "&#128104;&zwj;&#128105;&zwj;&#128103;&zwj;&#128103;", "category": "p", "order": ""},
{"emoji": "👨‍👩‍👧‍👦", "name": "family_children", "shortname": "", "unicode": "", "html": "&#128104;&zwj;&#128105;&zwj;&#128103;&zwj;&#128102;", "category": "p", "order": ""},
{"emoji": "👨‍👩‍👦‍👦", "name": "family_two_boys", "shortname": "", "unicode": "", "html": "&#128104;&zw
@scarolan
scarolan / plan.sh
Last active October 9, 2016 20:23 — forked from nathenharvey/plan.sh
pkg_origin=firstnamelastname
pkg_name=mytutorialapp
pkg_version=0.2.0
pkg_maintainer="First Last <you@example.com>"
pkg_license=()
pkg_source=nosuchfile.tar.gz
pkg_upstream_url=https://github.com/scarolan/habitat-example-plans
pkg_deps=(core/node)
pkg_expose=(8080)
@scarolan
scarolan / gist:f93a8f9b362c4d3a4436
Last active November 20, 2015 19:27
Set the tab name in iTerm to contain the current directory and git branch
function set_iterm_title {
echo -ne "\e]1;$1\a"
}
function git_branch {
BRANCH_REFS=$(git symbolic-ref HEAD 2>/dev/null) || return
GIT_BRANCH="${BRANCH_REFS#refs/heads/}"
[ -n "$GIT_BRANCH" ] && echo "$GIT_BRANCH "
}
use_inline_resources
action :create do
# Set the document root
document_root = "/srv/apache/#{new_resource.site_name}"
# Add a template for Apache virtual host configuration
template "/etc/httpd/conf.d/#{new_resource.site_name}.conf" do
source "custom.erb"
mode "0644"
@scarolan
scarolan / gist:794132f8a5befe227b49
Created October 6, 2015 03:03 — forked from jimcroft/gist:3878113
Enable WinRM for Chef bootstrapping via EC2 user data
<powershell>
winrm quickconfig -q
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="300"}'
winrm set winrm/config '@{MaxTimeoutms="1800000"}'
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/service/auth '@{Basic="true"}'
netsh advfirewall firewall add rule name="WinRM 5985" protocol=TCP dir=in localport=5985 action=allow
netsh advfirewall firewall add rule name="WinRM 5986" protocol=TCP dir=in localport=5986 action=allow
( •_•)
( •_•)>⌐■-■
(⌐■_■)