Skip to content

Instantly share code, notes, and snippets.

View jhyland87's full-sized avatar

J jhyland87

View GitHub Profile
#!/usr/bin/python
import json
import os
import sys
ff_folder = None
for f in os.listdir('/home/guest/.mozilla/firefox'):
if f.endswith('.default'):
// ==UserScript==
// @name Miscellaneous Javascript utilities
// @namespace https://raw.githubusercontent.com/jhyland87/tampermonkey/master/common/utils.js
// @version 0.1
// @description Add some additional methods to the standard javascript prototypes
// @author Justin Hyland ([email protected])
// @include *
// @match *
// @homepage https://github.com/jhyland87/tampermonkey
// @grant none
@jhyland87
jhyland87 / get-session-cwd.sh
Created November 17, 2017 15:45
Parse the lsof output to display what users/ttys are in what directories
lsof | awk '$1 == "bash" && $4 == "cwd"'
This file has been truncated, but you can view the full file.
! function(e) {
function __webpack_require__(n) {
if (t[n]) return t[n].exports;
var r = t[n] = {
i: n,
l: !1,
exports: {}
};
return e[n].call(r.exports, r, r.exports, __webpack_require__), r.l = !0, r.exports
}
#! /usr/local/bin/awk -f
# https://gist.github.com/jhyland87/95d88e9f32a77f8d6860f69c3332719d
function trim( str ) {
sub( /^[ \t\r\n]+/, "", str )
sub( /[ \t\r\n]+$/, "", str )
return str
}

Awk Variables

Key Description Value Type Values Default Notes
item,items Header item(s) to look for String Set-Cookie SetCookie setcookie N/A This is the only required value
limit Maximum number of results to return Integer 0 (all) all 2 1 Limits the results to a single item unless this is changed
keys Determines if the results should include the header keys as well boolean 1 0 1 0 is treated the same as all
quote Determines if the output values should have the header value in quotes boolean/string 1 single double 0
format Format to print data in String %-30s : %s\n %s\n N/A
<?php
function getFilePerms( $filename ){
$perms = fileperms( $filename );
switch ($perms & 0xF000) {
case 0xC000: // socket
$info = 's';
break;
case 0xA000: // symbolic link
$info = 'l';
$ npm run build
> [email protected] build /Users/me/Documents/Projects/personal/myproject.local
> phenomic build
⚡️ Hey! Let's get on with it
ModuleBuildError: Module build failed: ModuleParseError: Module parse failed: Unexpected character '' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
at doBuild (/Users/me/Documents/Projects/personal/myproject.local/node_modules/webpack/lib/NormalModule.js:303:19)
@jhyland87
jhyland87 / phenomic-build-fail.txt
Created October 26, 2017 04:27
Phenomic build failing on bootstrap CSS import Raw
$ npm run build
> [email protected] build /Users/me/Documents/Projects/personal/myproject.local
> phenomic build
⚡️ Hey! Let's get on with it
ModuleNotFoundError: Module not found: Error: Can't resolve 'assets/plugins/bootstrap/css/bootstrap.css' in '/Users/me/Documents/Projects/personal/myproject.local'
at factoryCallback (/Users/me/Documents/Projects/personal/myproject.local/node_modules/webpack/lib/Compilation.js:276:40)
at factory (/Users/me/Documents/Projects/personal/myproject.local/node_modules/webpack/lib/NormalModuleFactory.js:235:20)
at resolver (/Users/me/Documents/Projects/personal/myproject.local/node_modules/webpack/lib/NormalModuleFactory.js:60:20)
Justin
Oct 11, 2017
09:03 PM -0700
One of my previous invoices spiked way above the usual amount due to some security issues. The case ID is 4469605251, and its been resolved. Can you alter or void the invoice ID 113359921 now that its resolved?
Thank you!
===================================================
Amazon Web Services
Oct 12, 2017