yum -y install erlang perl perl-RRD-Simple.noarch perl-Log-Log4perl-RRDs.noarch gnuplot perl-Template-Toolkit
wget http://tsung.erlang-projects.org/dist/tsung-1.6.0.tar.gz
tar xfz tsung-1.6.0.tar.gz
cd tsung-1.6.0
./configure && make && make install
mkdir /root/.tsung
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
// Configuring the AWS SDK | |
var AWS = require('aws-sdk'); | |
AWS.config.update({region: 'REGION'}); | |
exports.handler = (event, context, callback) => { | |
// TODO implement | |
// create DynamoDB service object | |
var dynamodb = new AWS.DynamoDB({region: 'REGION', apiVersion: '2012-08-10'}); | |
/* This example creates a table named Music. */ | |
var params = { |
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/sh | |
sed -i.default "s/^zend_extension=/;zend_extension=/" /usr/local/etc/php/7.0/conf.d/ext-xdebug.ini | |
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.php70.plist | |
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php70.plist | |
echo "xdebug disabled" |
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
<?php | |
# file : bootstrap/app.php | |
# ........ | |
/* | |
|-------------------------------------------------------------------------- | |
| Load The Application Routes | |
|-------------------------------------------------------------------------- | |
| | |
| Next we will include the routes file so that they can all be added to | |
| the application. This will provide all of the URLs the application |
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
brew unlink gawk | |
brew reinstall awk | |
awk |
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
[root@cls-ebizu ~]# scrapy shell "http://www.focus.de/sport/formel1/michael-schumacher-in-schumachers-abwesenheit-ausstellung-zur-formel-1-karriere-eroeffnet_id_5286608.html" | |
2016-03-03 17:52:54 [scrapy] INFO: Scrapy 1.0.5 started (bot: scrapybot) | |
2016-03-03 17:52:54 [scrapy] INFO: Optional features available: ssl, http11, boto | |
2016-03-03 17:52:54 [scrapy] INFO: Overridden settings: {'LOGSTATS_INTERVAL': 0, 'DUPEFILTER_CLASS': 'scrapy.dupefilters.BaseDupeFilter'} | |
2016-03-03 17:52:55 [scrapy] INFO: Enabled extensions: CloseSpider, TelnetConsole, CoreStats, SpiderState | |
2016-03-03 17:52:55 [boto] DEBUG: Retrieving credentials from metadata server. | |
2016-03-03 17:52:55 [boto] ERROR: Caught exception reading instance data | |
Traceback (most recent call last): | |
File "/usr/lib/python2.7/site-packages/boto/utils.py", line 210, in retry_url | |
r = opener.open(req, timeout=timeout) |
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
# Base package | |
sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm | |
yum update -y | |
# Add swap | |
sudo fallocate -l 4G /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
echo "/swapfile swap swap sw 0 0" >> /etc/fstab |
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
[root@cls rss_crawler]# scrapy crawl news | |
http://www.focus.de/sport/formel1/formel-1-idol-in-marburger-ausstellung-alles-dreht-sich-um-michael-schumacher-wie-es-ihm-geht-bleibt-ungewiss_id_5292575.html | |
2016-02-23 20:15:06 [scrapy] INFO: Scrapy 1.0.5 started (bot: rss_crawler) | |
2016-02-23 20:15:06 [scrapy] INFO: Optional features available: ssl, http11, boto | |
2016-02-23 20:15:06 [scrapy] INFO: Overridden settings: {'NEWSPIDER_MODULE': 'rss_crawler.spiders', 'SPIDER_MODULES': ['rss_crawler.spiders'], 'BOT_NAME': 'rss_crawler'} | |
2016-02-23 20:15:06 [scrapy] INFO: Enabled extensions: CloseSpider, TelnetConsole, LogStats, CoreStats, SpiderState | |
2016-02-23 20:15:06 [boto] DEBUG: Retrieving credentials from metadata server. | |
2016-02-23 20:15:06 [boto] ERROR: Caught exception reading instance data | |
Traceback (most recent call last): | |
File "/usr/lib/python2.7/site-packages/boto/utils.py", line 210, in retry_url |
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
<?php | |
// use tests\codeception\backend\AcceptanceTester; | |
use tests\codeception\backend\acceptance\BaseStep; | |
class CustomerCest | |
{ | |
public $user = 'Fajri'; | |
// private $cookie = 'xyz'; |
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/sh | |
now="$(date +'%Y_%m_%d_%H_%M')" | |
filename_app="CRM_APP_$now".tar.gz | |
filename_db="CRM_DB_$now".sql.gz | |
backupfolder="/home/backup" | |
backupfolder_app="/var/www/website" | |
fullpathbackupfile_db="$backupfolder/$filename_db" | |
fullpathbackupfile_app="$backupfolder/$filename_app" | |
# execute mysql | |
mysqldump -u user -pPasswd -h xxx.xxx.xxx.xxx databases | gzip -9 > "$fullpathbackupfile_db" |