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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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
# Compile PCRE - Perl Compatible Regular Expressions | |
cd /usr/local/src | |
curl -O ftp://ftp.csx.cam.ac.uk//pub/software/programming/pcre/pcre-8.32.tar.gz | |
tar -xvzf pcre-8.32.tar.gz | |
cd pcre-8.32 | |
./configure | |
make | |
sudo make install | |
# Compile Autoconf |
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 | |
/** | |
* @package Joomla.CLI | |
* @subpackage cli_userstats | |
*/ | |
// Make sure we're being called from the command line, not a web interface | |
if (array_key_exists('REQUEST_METHOD', $_SERVER)) die(); |
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
JFactory::getDbo()->setQuery("SELECT 'beforeCActivities::_getData_getActivities'")->execute(); // Query progress mark |
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 | |
$header[] = '<html>'; | |
$header[] = '<head>'; | |
$header[] = '<script src="https://code.jquery.com/jquery.js"></script>'; | |
$header[] = '<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>'; | |
$header[] = '<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">'; | |
$header[] = '</head>'; | |
$header[] = '<body style="background-color: lightgrey">'; | |
$footer[] = '</body>'; | |
$footer[] = '</html>'; |
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_put_contents('/tmp/joomla_querylog_' . time() . '.log', implode("\n", array_map(function ($item) { return str_replace("\n", " ", $item); }, $log))); |
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 | |
// Load the builder class for the core.php file. | |
jimport('grisgris.builder.registry'); | |
jimport('grisgris.builder.builder'); | |
jimport('grisgris.builder.aggregate'); | |
jimport('grisgris.builder.generic'); | |
jimport('grisgris.builder.cache'); | |
jimport('grisgris.builder.table'); | |
jimport('grisgris.provider.provider'); |
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 | |
/** | |
* @package Gris-Gris.Skeleton | |
* @subpackage Builder | |
* | |
* @copyright Copyright (C) 2014 Respective authors. All rights reserved. | |
* @license Licensed under the MIT License; see LICENSE.md | |
*/ | |
namespace Grisgris\Builder; |
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
du -sm * | sort -g -r | egrep ^[0-9]{3} |
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
export PS1='\h:\W \u\$ ' | |
alias v='ls -lh' | |
alias vv="du --max-depth=1 -k | sort -n | cut -f2 | xargs -d '\n' du -sh" | |
# Let the computer remember that which would otherwise be forgotten. | |
# Append to the history otherwise multiple tabs clobber each other. | |
shopt -s histappend | |
# Set the number of entries in the history file to be sufficiently large. |
OlderNewer