yum -y install epel-release
yum -y upgrade
yum -y install openssh-server net-tools iputils psmisc less which man mc bash-completion bash-completion-extras bash-argsparse bind-utils traceroute htop mtr
echo "export HISTTIMEFORMAT='%F %T '" > /etc/profile.d/history.sh
echo "export HISTIGNORE='ls -l:pwd:date:'" >> /etc/profile.d/history.sh
echo "export HISTCONTROL=ignoredups" >> /etc/profile.d/history.sh
systemctl enable sshd
systemctl start sshd
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
| for i in *.ts; do filename=$(basename $i); base=${filename%.*}; ffmpeg -i $filename -ss 00:03:00.000 -t 00:00:30.000 -c:v libvpx -b:v 1M -c:a libvorbis $base.webm; done |
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
| // run on https://kindle.amazon.com/your_highlights | |
| // find asin in the form for a delete on the book you want to remove highlights for | |
| var asin = "B00BNGXNW2"; | |
| $('form > input[value="'+asin+'"]').each(function(index, input) { | |
| var form = input.closest('form'); | |
| var action = $(form).attr('action'); | |
| var auth = $(form).find("input[name=authenticity_token]").attr('value'); | |
| //var asin = $(form).find("input[name=asin]").attr('value'); | |
| var annid = $(form).find("input[name=annotation_id]").attr('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
| function! GetXqueryNamespace() | |
| normal! yiw | |
| return split(split(@", ":")[0], '\$')[0] | |
| endfunction | |
| function! GetXqueryDeclare() | |
| normal! yiw | |
| return split(@", ":")[1] | |
| endfunction |
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
| static let titleArray = "Youth Theme 2015: O YE THAT EMBARK IN THE SERVICE OF GOD".split(separator: " ") | |
| static let artistArray = "Elijah Thomas, Kyle Thorn, Maddie Wilson, Grayson O'Very, Anna Richey, Nick Neel, Baily Lawson".split(separator: ",") | |
| public func getRandomTitle() -> String { | |
| return getRandomLengthString(from: type(of: self).titleArray, separator: " ") | |
| } | |
| public func getRandomArtist() -> String { | |
| return getRandomLengthString(from: type(of: self).artistArray, separator: ",") | |
| } |
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
| Taken from http://ask.xmodulo.com/open-port-firewall-centos-rhel.html | |
| Open a Port on CentOS/RHEL 7 | |
| Starting with CentOS and RHEL 7, firewall rule settings are managed by firewalld service daemon. A command-line client called firewall-cmd can talk to this daemon to update firewall rules permanently. | |
| To open up a new port (e.g., TCP/80) permanently, use these commands. | |
| $ sudo firewall-cmd --zone=public --add-port=80/tcp --permanent | |
| $ sudo firewall-cmd --reload |
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
| function processRow(row) { | |
| let items = [... row.getElementsByTagName("td")] | |
| let elementName = items[2].innerText | |
| let elementSymbol = items[1].innerText | |
| let atomicNumber = items[0].innerText | |
| return elementName + ", " + elementSymbol + ", " + atomicNumber | |
| } | |
| var elements = [... document.getElementsByTagName("tr")].splice(1,).map(processRow).join('<br/>\n') |
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
| goto :loop | |
| :loop | |
| echo Copying Files | |
| copy *.jpg "C:\Users\vPro Demo\Dropbox\folder" | |
| timeout /t 30 | |
| goto :loop |
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
| int main(int args, const char * argv[]) { | |
| int userNum; | |
| cout << "Enter a number: "; | |
| cin >> userNum; | |
| while (userNum >= 4) { | |
| userNum = userNum / 4; | |
| cout << userNum << " "; | |
| } |
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
| Array.from(document.getElementsByClassName("CLASSNAME")).map(e => e.textContent).join(','); |