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
baseFolder="/tmp/app" | |
logFilesToCopy=("$baseFolder/auth/log/auth.log" "$baseFolder/jobs/log/jobs.log" "$baseFolder/app.log") | |
destination="/tmp/logs" | |
for logFile in ${logFilesToCopy[@]} | |
do | |
# logFile -> variable; ## -> greedy front trim; */ -> match everything until the last '/' | |
filename=${logFile##*/} |
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
<!DOCTYPE html> | |
<html ng-app='app'> | |
<head> | |
<title>Autocomplete Example</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
</head> | |
<body> | |
<h1>Autocomplete Example</h1> |
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
/* Check for local storage support */ | |
if(typeof(localStorage) == "undefined") { | |
alert("no storage!"); | |
} | |
/* var to encapsulate the logic */ | |
var authController = authController || {}; | |
authController.setAuthHeader = function(value) { | |
localStorage.setItem("authHeader", value); |
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
Shell command: | |
cat text.txt | tr -sc 'A-Za-z' '\n' | sort | uniq -c | sort -nr >> counts.txt | |
The content of text.txt: | |
Lorem Ipsum Dolor Sit Amet. Lorem ipsum. | |
The result in counts.txt: | |
2 Lorem |