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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
| class MY_Input extends CI_Input { | |
| function post($index = '', $xss_clean = FALSE) | |
| { | |
| // this will be true if post() is called without arguments | |
| if($index === '') | |
| { | |
| return ($_SERVER['REQUEST_METHOD'] === 'POST'); |
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
| /etc/bashrc | |
| /etc/profile | |
| ~/.bashrc | |
| ~/.bash_profile | |
| ~/.profile | |
| ~/.MacOSX/environment.plist |
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
| maxHeight = Math.max.apply(null, $("div.panel").map(function(){ | |
| return $(this).height(); | |
| }).get()); |
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
| .container{ | |
| position: relative; | |
| z-index:1; | |
| overflow:hidden; /*if you want to crop the image*/ | |
| } | |
| .container:before{ | |
| z-index:-1; | |
| position:absolute; | |
| left:0; | |
| top:0; |
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
| $(".carousel").swiperight(function() { | |
| $(this).carousel('prev').carousel('pause'); | |
| }).swipeleft(function() { | |
| $(this).carousel('next').carousel('pause'); | |
| }); |
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
| function flatten(array $array) { | |
| $return = array(); | |
| array_walk_recursive($array, function($a) use (&$return) { $return[] = $a; }); | |
| return $return; | |
| } |
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
| ruby -e "require 'base64'; print Base64.decode64( STDIN.read )" |
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
| #main { | |
| position: relative; | |
| } | |
| #main:after { | |
| content : ""; | |
| display: block; | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| background-image: url(/wp-content/uploads/2010/11/tandem.jpg); |
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 /path/to/base/dir -type d -exec chmod 755 {} + |
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
| # Credit: http://stackoverflow.com/a/18958914 | |
| <IfModule mod_rewrite.c> | |
| <IfModule mod_headers.c> | |
| # Define the root domain that is allowed | |
| SetEnvIf Origin .+ ACCESS_CONTROL_ROOT=yourdomain.com | |
| # Check that the Origin: matches the defined root domain and capture it in | |
| # an environment var if it does | |
| RewriteEngine On | |
| RewriteCond %{ENV:ACCESS_CONTROL_ROOT} !="" |