Skip to content

Instantly share code, notes, and snippets.

👀
building and learning

Michael michaelcoyote

👀
building and learning
  • The Bay Area, NorCal, Earth
Block or report user

Report or block michaelcoyote

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View YAML_Ref_Card.yaml
%YAML 1.1 # Reference card
---
Collection indicators:
'? ' : Key indicator.
': ' : Value indicator.
'- ' : Nested series entry indicator.
', ' : Separate in-line branch entries.
'[]' : Surround in-line series branch.
'{}' : Surround in-line keyed branch.
Scalar indicators:
View basicvimkeys.md

Basic VIM Keys

Notes

  • a number in front of most movement and edit keys acts as a multiplier to that key
    • e.g. 30j moves the cursor down 30 lines and 3i tora types toratoratora
  • editing can be stacked with movement characters
    • e.g. dw will delete a word
View linkdump
PSSH - http://archive09.linux.com/feature/151340?theme=print
bash tests - http://tldp.org/LDP/abs/html/comparison-ops.html http://tldp.org/LDP/abs/html/fto.html
ssh agent - http://www.unixwiz.net/techtips/ssh-agent-forwarding.html
Mac KB shortcuts - http://support.apple.com/kb/ht1343
bosh docs - http://docs.cloudfoundry.org/bosh/
@michaelcoyote
michaelcoyote / manifest2vm.md
Last active Aug 29, 2015
BOSH Manifest to running VM
View manifest2vm.md

CF Manifest to running VM

Path

  1. Manifest contains information about a job to start in either the

  2. configuration templates/"spec" (from cf-release/jobs/<jobname>/) + stemcell + packages (from cf-release/packages)

  3. magic from the BOSH Director (prepare) takes the stemcell and starts it and lays over package info and configs in /var/vcap

@michaelcoyote
michaelcoyote / mintupgradenotes.md
Last active Aug 29, 2015
Mint in place upgrade notes
View mintupgradenotes.md
@michaelcoyote
michaelcoyote / tilde_tricks.md
Last active Aug 29, 2015
Stupid tilde.club tricks
View tilde_tricks.md

Generate a list of users with a uid greater than 500

awk -F: '$3 > 500 {print $1}' /etc/passwd

Look for users with a space after the username grep " :x" /etc/passwd

It is possible to set the TZ variable on a per user or even per script basis.

@michaelcoyote
michaelcoyote / ck_userupdate.sh
Last active Aug 29, 2015
check for user running a program before updating and skip them if they are
View ck_userupdate.sh
#!/bin/bash
#
# Proof of concept
# check for user running a program before updating and skip them if they are
#
PROGRAM="irssi"
# Check ps for users running a process name & compare against list of non-admin users
#
@michaelcoyote
michaelcoyote / keybase.md
Created Nov 3, 2014
keybase.io for michaelcoyote
View keybase.md

Keybase proof

I hereby claim:

  • I am michaelcoyote on github.
  • I am michaelcoyote (https://keybase.io/michaelcoyote) on keybase.
  • I have a public key whose fingerprint is DA1E 4F70 F783 3621 61A6 8549 67B5 CBC6 37EA A9D1

To claim this, I am signing this object:

@michaelcoyote
michaelcoyote / grepip.sh
Last active Aug 29, 2015
grep for ip address
View grepip.sh
# This is a function so, source me in.
# really basic grep function to find IP/netmask octets.
function ipgrep()
{
# find any pattern from "0.0.0.0" to "259.259.259.259"
# TODO fix this so it checks for legal octets (255.255.255.255) (Note: may be some time)
grep -o -E '\b(((2[0-5]|1[0-9])|[0-9])?([0-9]){1,2}\.){3}((2[0-5]|1[0-9])|[0-9])?([0-9])\b'
}
@michaelcoyote
michaelcoyote / java_sponsor_disable.reg
Created Jan 28, 2015
Disable the ask/yahoo/whatever toolbar install prompt
View java_sponsor_disable.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft]
"SPONSORS"="DISABLE"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft]
"SPONSORS"="DISABLE"
You can’t perform that action at this time.