Skip to content

Instantly share code, notes, and snippets.

View nwalke's full-sized avatar

Nick Walke nwalke

  • Kansas
View GitHub Profile
/usr/src/monica/resources/views/settings # ls -la
total 64
drwxr-xr-x 11 monica monica 4096 Mar 22 16:42 .
drwxr-xr-x 15 monica monica 4096 Mar 22 16:42 ..
-rw-r--r-- 1 monica monica 2537 Mar 22 16:42 _sidebar.blade.php
drwxr-xr-x 2 monica monica 4096 Mar 22 16:42 api
drwxr-xr-x 2 monica monica 4096 Mar 22 16:42 auditlog
drwxr-xr-x 2 monica monica 4096 Mar 22 16:42 dav
-rw-r--r-- 1 monica monica 1594 Mar 22 16:42 export.blade.php
drwxr-xr-x 2 monica monica 4096 Mar 22 16:42 imports
@nwalke
nwalke / script.js
Created January 10, 2020 08:06
Synchrony Promotional Balance Finder Script
var amount = 0;
$('#promotionalPurchaseList li').each(function(index) {
var currency = $(this).find('.activityAmtBlock .balanceAmount:first').text().trim().replace(/[^0-9.-]+/g,"")
if (currency) { amount += Number(currency)}
})
console.log("Total promo balance is " + amount.toFixed(2));

Keybase proof

I hereby claim:

  • I am nwalke on github.
  • I am nwalke (https://keybase.io/nwalke) on keybase.
  • I have a public key ASCEs-EVaIq43JclB50XFhI3CaAO73vs6e-0ncGFVgapxQo

To claim this, I am signing this object:

{
"region": "us-west-1",
"accountId": "111222333444",
"eventTriggerName": "Trigger-group-us-west-3-deploy-failed",
"applicationName": "ProductionApp-us-west-3",
"deploymentId": "d-75I7MBT7C",
"deploymentGroupName": "dep-group-def-456",
"createTime": "1446744188.595",
"completeTime": "1446744190.402",
"deploymentOverview": {
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 381.22 (buildmeister@swio-display-x86-rhel47-02) Thu May 4 01:29:00 PDT 2017
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection
@nwalke
nwalke / gist:9d674d8f1e26e767e579eb0b78a9f58e
Created June 3, 2017 04:20
Monitors not turning back on
Jun 2 22:37:27 mia kernel: [10975.244085] snd_hda_codec_hdmi hdaudioC2D0: HDMI: invalid ELD data byte 0
Jun 2 22:37:27 mia rtkit-daemon[2493]: Supervising 3 threads of 1 processes of 1 users.
Jun 2 22:37:27 mia rtkit-daemon[2493]: Successfully made thread 7746 of process 3165 (n/a) owned by '1000' RT at priority 5.
Jun 2 22:37:27 mia rtkit-daemon[2493]: Supervising 4 threads of 1 processes of 1 users.
Jun 2 22:37:27 mia unity-settings-[3082]: GtkDialog mapped without a transient parent. This is discouraged.
Jun 2 22:37:27 mia compiz[3233]: WARN 2017-06-02 22:37:27 unity.screen UScreen.cpp:131 UScreen::GetMonitorName: Failed to get monitor name for monitor0
Jun 2 22:37:27 mia compiz[3233]: WARN 2017-06-02 22:37:27 unity.screen UScreen.cpp:131 UScreen::GetMonitorName: Failed to get monitor name for monitor0
Jun 2 22:37:27 mia colord[2045]: failed to get session [pid 3082]: No such device or address
Jun 2 22:37:27 mia colord[2045]: failed to get session [pid 3082]: No such device or address
Jun 2 22:
@nwalke
nwalke / gist:447f6b02e3350be939d2f32ce7915de1
Created June 1, 2017 20:44
AWS CodeDeploy Deployment Spec when launched from ASG
{
"deploymentInfo": {
"applicationName": "myapp",
"status": "Succeeded",
"deploymentOverview": {
"Skipped": 0,
"Succeeded": 1,
"Failed": 0,
"Ready": 0,
"InProgress": 0,
RUN apt-get update \
&& apt-get install -y wget \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
&& wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
&& apt-get update \
&& apt-get install -y libpq-dev \
{
"sku": "F7H92E3N3TN52552",
"productFamily": "Compute Instance",
"attributes": {
"servicecode": "AmazonEC2",
"location": "US East (N. Virginia)",
"locationType": "AWS Region",
"instanceType": "t2.medium",
"instanceFamily": "General purpose",
"vcpu": "2",
import boto3
import collections
from datetime import datetime
from time import gmtime, strftime
notOkayDays = 120
today = datetime.today().replace(tzinfo=None)
client = boto3.client('iam')
iam = boto3.resource('iam')