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
# List DHCP leases | |
cat /var/lib/misc/dnsmasq.leases |
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
# Find all files ending with ".swp" | |
find . -name \*.swp -type f | |
# Find all files ending with ".swp" and delete them | |
find . -name \*.swp -type f -delete | |
# Find all files, not in hidden directory, that contain the pattern "TRANDESCID" and also any of the patterns "41", "42", "45", and "50" | |
find . -not -path '*/\.*' -type f -exec grep -iq TRANDESCID {} \; -exec grep -il -e 41 -e 42 -e 45 -e 50 {} \; | |
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
# List snapshots | |
sudo zfs list -t snapshot | |
# List differences since snapshot | |
sudo zfs diff snapshot snapshot_or_filesystem_or_pool | |
# Send+receive an incremental stream between two snapshots | |
sudo sh -c 'zfs send -i tank1@snapshot2 tank1@snapshot3 | zfs receive tank2' |
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/sh | |
if [ ! "$1" = "" ] ; then | |
if [ "$GITREPO" = "" -a -d "/c/@Kiln" ] ; then | |
GITREPO="/c/@Kiln" | |
fi | |
if [ "$GITREPO" != "" ] ; then | |
echo "Git repositories found in $GITREPO" |
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
;; User keymap | |
;; ----------------------------- | |
;; Keymaps are stored as a set of diffs that are merged together together | |
;; to create the final set of keys. You can modify these diffs to either add | |
;; or subtract bindings. | |
;; | |
;; Like behaviors, keys are bound by tag. When objects with those tags are active | |
;; the key bindings are live. Keys can be bound to any number of Light Table commands, | |
;; allowing you the flexibility to execute multiple operations together. To see a list | |
;; of all the commands you can execute, start typing a word related to the thing you |
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
<!-- Adopted from The real HTML5 boilerplate – CSS Wizardry – CSS, OOCSS, front-end architecture, performance and more, by Harry Roberts at http://csswizardry.com/2011/01/the-real-html5-boilerplate/ --> | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<!--[if IE]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
</head> |
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
// Public operators | |
public static bool operator ==(SomeClass item1, SomeClass item2) | |
{ | |
if (System.Object.ReferenceEquals(item1, item2)) | |
return true; | |
if (((object)item1 == null) || ((object)item2 == null)) | |
return false; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Solarized Colors</title> | |
<!--[if IE]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
</head> | |
<body id="home"> |
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
<!-- Styles adapted from http://purecss.io/tables/ --> | |
<table style="border-collapse: collapse; border-spacing: 0; empty-cells: show; border: 1px solid #cbcbcb; line-height: 1.5;"> | |
<thead style="background: #e0e0e0; color: #000; text-align: left; vertical-align: bottom;"> | |
<tr> | |
<th style="border-left: 1px solid #cbcbcb; border-width: 0 0 0 1px; font-size: inherit; margin: 0; overflow: visible; border-left-width: 0;"> | |
Data value | |
</th> | |
<th style="border-left: 1px solid #cbcbcb; border-width: 0 0 0 1px; font-size: inherit; margin: 0; overflow: visible; border-left-width: 0;"> | |
Description |
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
# Prepend 'f ' to all of the files in the current directory with a '.jpg' extension. | |
Dir *.jpg | Rename-Item -NewName { "f " + $_.Name } | |
# Prepend 'f ' to all of the files in the current directory with a '.gif' or '.jpg' extension. | |
Get-ChildItem .\* -Include *.gif, *.jpg | Rename-Item -NewName { "f " + $_.Name } |