$this->uri->segment(n); // n=1 for controller, n=2 for method, etc
This file contains hidden or 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 | |
//Simple Function to Get Max Upload Size from PHP | |
$max_upload = min(ini_get('post_max_size'), ini_get('upload_max_filesize')); | |
$max_upload = str_replace('M', '', $max_upload); | |
$max_upload = $max_upload * 1024; |
This file contains hidden or 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 | |
// This one is my debugging snippet | |
if ( $this->_debug === TRUE ) | |
{ | |
Console::log('['. get_class($this) .': '. __METHOD__ .'] . 'replacementwithusefultext' ); | |
} | |
// |
This file contains hidden or 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 . -name *.orig.* -type f -exec rm {} \ |
This file contains hidden or 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 ./src -name '*.txt' -exec cat '{}' \; > test.txt | |
//The above looks through everything in the ./src directory (including all subdirectories) for any files with the .txt //extension. Each file it finds, it adds to test.txt. So at the end of the command's run, all of the text files will be //combined together into text.txt. You can use this strategy to easily combine lots of files into one. |
This file contains hidden or 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 | |
echo 'Currently loaded libs: '.implode(', ', $this->loader->_ci_classes()); |
This file contains hidden or 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
$(document).(ready(function () { | |
$(".no-js").addClass('js').removeClass('.no-js'); | |
}); |
This file contains hidden or 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
@font-face {font-family:"font";src:url("https://")}@media (touch-enabled),(-webkit-touch-enabled),(-moz-touch-enabled),(-o-touch-enabled),(-ms-touch-enabled),(modernizr){#touch{top:9px;position:absolute}}@media (transform-3d),(-webkit-transform-3d),(-moz-transform-3d),(-o-transform-3d),(-ms-transform-3d),(modernizr){#csstransforms3d{left:9px;position:absolute;height:3px;}}#generatedcontent:after{content:":)";visibility:hidden} |
This file contains hidden or 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
<a name="top"> | |
<a href="#top" class="scroll-totop">Top</a> | |
<script> | |
$('a[href=#top]').click(function(){ | |
$('html, body').animate({scrollTop:0}, 'slow'); |