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
View number of threads open | |
ps huH p <PID_OF_U_PROCESS> | wc -l | |
e.g. do ps huH p 2016 | wc -l ; sleep 1; done |
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
1.Download Java agent zip file from New Relic site | |
2. Under the tomcat base directory create a directory newrelic | |
3. Put the unzipped files in this directory | |
4. Update the license key in newrelic.yml with that shown in New Relic Admin | |
5. Update the App Name to something suitable | |
6. Update catalina.sh to have following: | |
NR_JAR=/usr/local/tomcat/newrelic/newrelic.jar; export NR_JAR | |
CATALINA_OPTS="$CATALINA_OPTS -javaagent:$NR_JAR"; export CATALINA_OPTS | |
7. Restart Tomcat – should now appear as a new application in New Relic |
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
XML Schema Resolution: | |
bin/magento dev:urn-catalog:generate .idea/misc.xml | |
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
git tag --sort version:refname |tail -n1 | gawk -F"." '{$NF+=1}{print $0RT}' OFS="." ORS="" | |
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
Find your my.cnf: | |
mysql --help | grep "Default options" -A 1 | |
Edit: | |
[mysqld] | |
general_log_file = /opt/local/var/log/mysql56/mysql-query.log | |
general_log = on | |
To check: |
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
"repositories": [ | |
{ | |
"type": "composer", | |
"url": "https://repo.magento.com/" | |
}, | |
{ | |
"type": "vcs", | |
"url": "[email protected]:webshopapps/module-shipper.git" | |
} | |
], |
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
list ip tables | |
sudo iptables -S | |
list nat ip tables | |
sudo iptables -L -vt nat | |
Delete nat ip tables | |
for i in $( iptables -t nat --line-numbers -L | grep ^[0-9] | awk '{ print $1 }' | tac ); do iptables -t nat -D PREROUTING $i; done | |
http://lubos.rendek.org/remove-all-iptables-prerouting-nat-rules/ |
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 id "$1" >/dev/null 2>&1; then | |
echo "user exists" | |
else | |
echo "user does not exist, creating" | |
useradd -c "$1 last" $1 -m | |
fi | |
echo "$1 ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers |
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
In datatable declaration: | |
fnRowCallback: function (nRow, aData, iDisplayIndex, iDisplayIndexFull) { | |
row_id = ($(nRow).attr("id")).split('_').pop(); | |
$(nRow).attr("data-edit-location", '<%= controller_path %>/' + row_id + '/edit'); | |
return nRow; | |
} | |
In document.ready: |
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
$('.panel-collapse').on 'hidden.bs.collapse', -> | |
if @id | |
localStorage.removeItem @id | |
return | |
$('.panel-collapse').on 'shown.bs.collapse', -> | |
if @id | |
localStorage[@id] = 'true' | |
return |
NewerOlder