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
############## latest QT | |
Download the latest unified Qt linux installer: wget http://download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run | |
Make the downloaded file executable: chmod +x qt-unified-linux-x64-online.run | |
Become superuser: su (password) | |
Install gcc, make and friends: zypper install --type pattern devel_basis | |
Install Qt: ./qt-unified-linux-x64-online.run | |
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
import random | |
import subprocess | |
def ab_biggerthan_ten(): | |
# Generate 2 number sum of which <= 10 | |
a = (random.randint(1,9)) | |
rmin = 10-a | |
rmax = 9 | |
b = (random.randint(rmin, rmax)) |
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/bash | |
TOTAL=0 | |
HTOTAL=0 | |
function generator(){ | |
# $1: modulus | |
# $2: addrank | |
# $3: multrank |
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
http://paste.ofcode.org/xcviMeQdpupuiWC87GkT32 | |
//Source: | |
//https://andrewramzyblog.wordpress.com/2016/04/25/how-to-get-a-free-full-plural-sight-subscription-download-courses-automatically-from-pluralsight/ | |
//1 | |
var jq = document.createElement('script'); | |
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
//2 |
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/bash | |
### Install GNS3 | |
sudo add-apt-repository ppa:gns3/ppa | |
sudo apt-get update | |
sudp apt-get install -y python3-pip python-pip | |
### Install pyqt | |
pip3 install pyqt5 |
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
for log in $(ls /var/log/heat/); do tail /var/log/heat/$log;echo '###'; echo '###' ;done | |
2017-01-07 08:43:06.406 14763 WARNING oslo_config.cfg [-] Option "rpc_backend" from group "DEFAULT" is deprecated for removal. Its value may be silently ignored in the future. | |
2017-01-07 08:43:14.356 14763 INFO heat.api.cfn [-] Starting Heat API on 0.0.0.0:8000 | |
2017-01-07 08:43:14.437 14763 WARNING oslo_reports.guru_meditation_report [-] Guru meditation now registers SIGUSR1 and SIGUSR2 by default for backward compatibility. SIGUSR1 will no longer be registered in a future release, so please use SIGUSR2 to generate reports. | |
2017-01-07 08:43:14.439 14763 INFO heat.common.wsgi [-] Starting single process server | |
2017-01-07 08:43:14.439 14763 INFO eventlet.wsgi.server [-] (14763) wsgi starting up on http://0.0.0.0:8000 | |
### | |
### | |
2017-01-07 08:43:12.231 14865 WARNING oslo_config.cfg [-] Option "rpc_backend" from group "DEFAULT" is deprecated for removal. Its value may be silently ignored in the future. |
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
#!ipxe | |
prompt --key 0x02 --timeout 10000 Press Ctrl-8 for iPXE command line... && shell || dhcp && goto netboot || | |
ifclose | |
echo -n Choose net0 or net1 or ...: ${} && read nic | |
set ${nic}/dns 8.8.8.8 | |
set ${nic}/netmask 255.255.255.0 | |
config ${nic} | |
ifopen ${nic} | |
goto netboot |
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
#!ipxe | |
dhcp | |
chain http://boot.ipxe.org/demo/boot.php |
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/bash | |
mongodump --out /backup/mongodb-$(date +"%d-%m-%Y-%H:%M:%S") | |
mongodump --out /backup/mongodb-latest |
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/bash | |
if [ "$1" = "" ] ; then | |
mongorestore /backup/mongodb-latest/ | |
else | |
mongorestore /backup/mongodb-$1/ | |
fi |