Skip to content

Instantly share code, notes, and snippets.

View jhyland87's full-sized avatar

J jhyland87

  • 48°52.6′S 123°23.6′W
View GitHub Profile
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
> myproject.it@1.0.0 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
> myproject.com@1.0.0 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
#! /usr/local/bin/awk -f
# echo -e "Jane Doe\n123 Main Street\nAnywhere, SE 12345-6789\n\nJohn Smith\n456 Tree-lined Avenue\nSmallville, MW 98765-4321" | ./include-test.awk
#@include "/Users/jhyland/Documents/scripts/awk/utils.awk"
function resetVhost() {
vhost["server_name"] = ""
vhost["document_root"] = ""
vhost["error_log"] = ""
vhost["access_log"] = ""
vhost["cfg_file"] = ""
#!/usr/local/bin/awk -f
# Todo:
# skip empty rows
# Look for duplicate pids
# Validate data types in columns:
# - pid (int)
# - ppid (int)
# - uid (int)
# - ruid (int)
@jhyland87
jhyland87 / ps-totaler.awk
Created October 11, 2017 19:10
Awk script to total the data returned from ps
#!/usr/bin/awk -f
# Examples
# $ ps -o pid,user,cpu,%cpu,%mem,nswap,sess,tty | ./ps_total.awk
# Count : 58
# USER : 0
# CPU : 0
# %CPU : 1.8
# %MEM : 2.5
# NSWAP : 0