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 | |
* gvdump.php | |
* | |
* @author: Frédéric G. MARAND <fgm@osinet.fr> | |
* | |
* @copyright (c) 2014 Ouest Systèmes Informatiques (OSInet). | |
* | |
* @license MIT |
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
# post_loc.txt contains the json you want to post | |
# -p means to POST it | |
# -H adds an Auth header (could be Basic or Token) | |
# -T sets the Content-Type | |
# -c is concurrent clients | |
# -n is the number of requests to run in the test | |
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/ |
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 | |
class Text { | |
/** | |
* Limits a phrase to a given number of characters. | |
* | |
* $text = Text::limit_chars($text); | |
* | |
* @param string $str phrase to limit characters of |
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 | |
/* | |
Install: | |
1) create a folder: disablecsrf inside 'plugins/' directory. | |
2) place this file there and name it: disablecsrf.php | |
3) go to config/config.inc.php, and add it to plugins, like: | |
$config['plugins'] = array('disablecsrf'); | |
CSRF should now be disabled for login. | |
*/ |
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
# Set variables in .bashrc file | |
# don't forget to change your path correctly! | |
export GOPATH=$HOME/golang | |
export GOROOT=/usr/local/opt/go/libexec | |
export PATH=$PATH:$GOPATH/bin | |
export PATH=$PATH:$GOROOT/bin |
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 | |
sudo apt-get install qt5-default | |
wget http://kcachegrind.sourceforge.net/kcachegrind-0.7.4.tar.gz | |
tar xvf kcachegrind-0.7.4.tar.gz | |
cd kcachegrind-0.7.4 | |
qmake && make | |
sudo install -m 755 qcachegrind/qcachegrind /usr/local/bin | |
sudo install -m 644 qcachegrind/qcachegrind.desktop \ | |
/usr/local/share/applications/ |
OlderNewer