This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( 21)[Fri Apr 06 09:20:06| 1:000]{47}jhyland@MacBook-Pro:~/Documents/scripts/typescript/test(✓)$ cat oop.1.ts | |
'use strict' | |
class Greeter { | |
greeting: string; | |
constructor(message: string) { | |
this.greeting = message; | |
} | |
greet() { | |
return "Hello, " + this.greeting; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function stfups { | |
declare -A bundles | |
bundles[outlook]="com.microsoft.Outlook" | |
bundles[chrome]="com.google.Chrome" | |
bundles[vnc]="com.realvnc.vncviewer" | |
if [[ -z $1 ]]; then | |
echo "Need to specify a bundle - One of: ${!bundles[@]}" | |
return 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo taskinfo $(lsappinfo info com.google.Chrome -only pid | cut -d'=' -f2) | |
process: "Google Chrome" [96843] | |
coalition (type 0) ID: 344 | |
coalition (type 1) ID: 0 | |
suspend count: 0 | |
virtual bytes: 4.07 GB; resident bytes: 543.17 MB | |
run time: 349997 s | |
user/system time (current threads): 3415.911501 s / 806.561131 s | |
user/system time (terminated threads): 459.655692 s / 117.408499 s | |
interrupt wakeups: 2115973 (737016 / 34.83% from platform idle) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ compgen -A command | sort -u | grep -Ev '^(x86_64|_|ec2|as-|mysql|sql|db|mongo|nfs|tcp|git|svn|mon-|airspy|check_)' | grep --color=always -iE '(proc|win|info|stat|web)' | |
FileStatsAgent | |
GetFileInfo | |
NetBootClientStatus | |
addftinfo | |
afinfo | |
argus-vmstat | |
capinfos | |
captoinfo | |
coproc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ lsappinfo info com.google.Chrome -only allowedtobecomefrontmost,applicationTypeToRestore,applicationWasTerminatedByTAL,applicationtype,arch,asn,bundleid,bundlelastcomponent,bundlename,bundlenamelc,bundlepath,changecount,creator,debuglevel,displayname,execpath,executablepath,filecreator,filename,filetype,hidden,isconnectedtowindowserver,isready,isregistered,isstopped,isthrottled,launchedForPersistence,launchedinquarantine,name,parentasn,pid,presentationmode,presentationoptions,psn,recordingAppleEvents,session,shellpath,supressRelaunch,version,kCFBundleNameKey,kLSASNKey,kLSASNToBringForwardAtNextApplicationExitKey,kLSAllowedToBecomeFrontmostKey,kLSApplicationBackgroundOnlyTypeKey,kLSApplicationBackgroundPriorityKey,kLSApplicationCountKey,kLSApplicationDesiresAttentionKey,,kLSApplicationForegroundPriorityKey,kLSApplicationForegroundTypeKey,kLSApplicationHasRegisteredKey,kLSApplicationHasSignalledItIsReadyKey,kLSApplicationInStoppedStateKey,kLSApplicationInThrottledStateAfterLaunchKey,kLSApplicationInformationS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/local/bin/awk -f | |
# Examples: | |
# ls -1 | ./hr-with-string.1.awk | |
# ls -1 | ./hr-with-string.1.awk -v pad=30 | |
# ls -1 | ./hr-with-string.1.awk -v pad=30 -v hr='-' | |
# ls -1 | ./hr-with-string.1.awk -v pad=30 -v hr='><' | |
function center( str, a, left, right ){ | |
right = int(( CFG[ pad ] - length(str)) / 2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sort --reverse /usr/share/dict/words | head -n 20 | awk -v hrl=20 -v padding=30 -v hr="x" -f ./hr-with-string.1.awk | |
------------------------------ zythum ------------------------------ | |
------------------------------ zythem ------------------------------ | |
------------------------------ zymurgy ------------------------------ | |
------------------------------ zymotoxic ------------------------------ | |
------------------------------ zymotize ------------------------------ | |
------------------------------ zymotically ------------------------------ | |
------------------------------ zymotic ------------------------------ | |
------------------------------ zymotechny ------------------------------ | |
------------------------------ zymotechnics ------------------------------ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/bash | |
function center { | |
if test -p /dev/stdin; then | |
data=$(</dev/stdin) | |
elif test -a ${1}; then | |
data=$(cat ${1}) | |
elif test -n ${1}; then | |
data=$* | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Backup mysql databases nightly | |
# Scott B. | |
# 6/2/2013 | |
# Create a current date string | |
DATE=`date +%Y.%m.%d-%H.%M.%S` | |
BACKUP_DIR=/mnt/CHD_DB_BACKUP/ | |
BACKUP_FILE=$BACKUP_DIR$DATE"_Mysql44_databases.sql" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Load nightly mysqldump | |
# aaa B / bbb G / ccc B | |
# 10/17/2014 | |
BACKUP_DIR=/mnt/CHD_DB_BACKUP | |
DATE=`date +%Y.%m.%d-%H.%M.%S` | |
BACKUP_FILE=`ls -1r $BACKUP_DIR/*.* | head -1` |