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 renderPage(url) { | |
| var page = require('webpage').create(); | |
| var redirectURL = null; | |
| page.onResourceReceived = function(resource) { | |
| if (url == resource.url && resource.redirectURL) { | |
| redirectURL = resource.redirectURL; | |
| } | |
| }; |
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
| export HISTCONTROL=ignoredups:erasedups # no duplicate entries | |
| export HISTSIZE=100000 # big big history | |
| export HISTFILESIZE=100000 # big big history | |
| shopt -s histappend # append to history, don't overwrite it | |
| # Save and reload the history after each command finishes | |
| export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND" |
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
| ssh -N -T -L *:8001:localhost:8000 dockerhost.local |
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
| sudo firewall-cmd --set-log-denied=all |
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
| To see what particular versions are available to you via yum you can use the --showduplicates switch. | |
| $ yum --showduplicates list httpd | expand | |
| Loaded plugins: fastestmirror, langpacks, refresh-packagekit | |
| Loading mirror speeds from cached hostfile | |
| * fedora: mirror.steadfast.net | |
| * rpmfusion-free: csc.mcs.sdsmt.edu | |
| * rpmfusion-free-updates: csc.mcs.sdsmt.edu | |
| * rpmfusion-nonfree: csc.mcs.sdsmt.edu | |
| * rpmfusion-nonfree-updates: csc.mcs.sdsmt.edu |
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
| go get github.com/aktau/github-release | |
| echo "export GITHUB_TOKEN=$1" >> ~/.bash_profile; | |
| git tag v0.0 | |
| git push --tags | |
| github-release.exe -v release --repo focusedu --user haisum -t v0.0 -d "Static file server" | |
| github-release.exe -v upload --repo focusedu --user haisum -t v0.0 -n focusedu.exe -f focusedu.exe |
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
| go get -v github.com/golang/lint/golint | |
| go get golang.org/x/tools/cmd/goimports | |
| go get -v golang.org/x/tools/cmd/guru | |
| go get -v github.com/rogpeppe/godef |
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
| select 'alter system kill session ''' || sid || ',' || serial# || ''';' from v$session where username = 'SCHEMANAME' | |
| alter system kill session '1977,12013'; | |
| drop user 'SCHEMANAME'; |
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
| { | |
| "swagger": "2.0", | |
| "info": { | |
| "description": "This is API documentation for SMS gateway.", | |
| "version": "1.0.0", | |
| "title": "SMS Gateway", | |
| "contact": { | |
| "email": "[email protected]" | |
| } | |
| }, |
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
| /bin/bash -c "innobackupex --stream=tar ./ | gzip -c -1 > /backup/mysql-master-17-08-2016.tar.gz" 2>/backup/mybkp.log | |
| scp backup.tar.gz remoteuser@remotehost:/backup/ | |
| cd backup | |
| mkdir mysql-backup | |
| cd mysql-backup | |
| tar -xzif backup.tar.gz | |
| innobackupex --apply-log --use-memory=2G /backup/mysql-backup | |
| service mysql stop | |
| mv /var/lib/mysql /var/lib/mysql-old | |
| mkdir /var/lib/msyql |