This file contains 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
# Play the "Submarine" audio clip once a minute | |
while true; do | |
/usr/bin/afplay /System/Library/Sounds/Morse.aiff | |
sleep 60 | |
done |
This file contains 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
cat users.csv | cut -f 3 -d "|" | sort | uniq -d | xargs -n 1 -I {} sed -i '/{}/d' ./users.csv |
This file contains 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
import "runtime" | |
// Generate a Stack Trace | |
buf := make([]byte, 1<<16) | |
runtime.Stack(buf, true) | |
n := bytes.Index(buf, []byte{0}) | |
stackTrace := string(buf[:n]) |
This file contains 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
if( window.self !== window.top ) | |
{ | |
alert(document.referrer); | |
} |
This file contains 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 | |
passwd -l username | |
pkill -KILL -u username |
This file contains 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
# Return the number of cores on a Mac OS machine | |
sysctl -n hw.ncpu | |
# This also works | |
sysctl hw.ncpu | awk '{print $2}' |
This file contains 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
rpm -qa --qf '%{INSTALLTIME} (%{INSTALLTIME:date}): %{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' |
This file contains 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
- name: Check if SELinux is running | |
command: getenforce | |
register: sestatus | |
changed_when: false | |
tags: selinux |
This file contains 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
" My ~/.vimrc is quite minimal as everything | |
" is inherited from Vim Boilerplate. | |
" Enable Vim Boilerplate Shortcuts | |
autocmd VimEnter * :call VBPShortcuts() |
NewerOlder