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 less than 2kb | |
find /path/to/directory -type f -size -2k | |
# Find all text files less than 2kb | |
find /path/to/directory -type f -name '*.txt' -size -2k | |
# Find all files with given pattern and count them | |
find -type f -name '*.jpg' | wc -l | |
find -type f -name 'e_*' | wc -l |
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
var a = 5; | |
function runMe(a){ | |
assert( a == ___, "Check the value of a." ); | |
function innerRun(){ | |
assert( b == ___, "Check the value of b." ); | |
assert( c == ___, "Check the value of c." ); | |
} | |
var b = 7; |
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
# The Expires* directives requires the Apache module `mod_expires` to be enabled. | |
<Location /assets/> | |
# Use of ETag is discouraged when Last-Modified is present | |
Header unset ETag | |
FileETag None | |
# RFC says only cache for 1 year | |
ExpiresActive On | |
ExpiresDefault "access plus 1 year" | |
</Location> |
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
require 'optparse' | |
require 'optparse/time' | |
require 'ostruct' | |
require 'pp' | |
class OptparseExample | |
CODES = %w[iso-2022-jp shift_jis euc-jp utf8 binary] | |
CODE_ALIASES = { "jis" => "iso-2022-jp", "sjis" => "shift_jis" } |
NewerOlder