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 | |
/** | |
* Like var_dump, but it prints out the whole expression "path" to the given string. | |
* | |
* @param mixed $haystack | |
* The object or array with many levels of nested arrays or objects containing your needle | |
* @param str $php_exp | |
* The php expression for the initial $haystack param | |
* @return str | |
* No return value. Prints output to stdout (assumed to be a browser). |
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 | |
// Note this is NOT recursive. | |
function scan_dir_for_non_utf8($dir_path) { | |
if ($dir = opendir($dir_path)) { | |
echo "opening $dir_path"; | |
$files_scanned = 0; | |
while (($file = readdir($dir)) !== false) { | |
// Don't go up directory levels | |
if (in_array($file, array('.','..'))) | |
continue; |
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
<p>To setup this bookmarklet in your browser, you'll need to:</p> | |
<ol> | |
<li>Clone (or download) this gist using the information on this page</li> | |
<li>Fill in your username and password</li> | |
<li>Change the drupal_domain variable to the domain of your drupal install</li> | |
<li>(Possibly) change the path to the path to your drupal login form</li> | |
<li>Drag the link to your bookmark bar</li> | |
</ol> | |
<p>To use, simply click the bookmark anywhere on your drupal_domain.</p> | |
<a href="javascript: (function(){ var user = 'username', pw = 'password', path = '/user/login', drupal_domain = '.example.com', domain = window.location.host, frame = document.createElement('iframe'), frame_length = frames.length; if(domain.indexOf(drupal_domain) !== -1){ document.body.appendChild( frame ); frame.src = '//' + domain + path; frame.style.display = 'none'; setTimeout(function() { frames[frame_length].document.getElementById('edit-name').value = user; frames[frame_length].document.getElementById('edit-pass').value = pw; frames[fr |
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
alias gvim='/c/Program\ Files\ \(x86\)/Vim/vim73/gvim.exe ' | |
alias expl='explorer ' | |
alias ga='git add ' | |
alias gb='git branch ' | |
alias gc='git commit -m' | |
alias gp='git push' | |
alias gs='git status ' | |
alias dld='cd /d/MySQL/drupal && ./drupal-db-download.sh' |
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
# Security | |
Options -Indexes | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteRule \.bat$ - [R=404] | |
</IfModule> | |
# Leverage Browser Caching | |
<IfModule mod_expires.c> | |
# Enable Expirations |
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
"-------About----- | |
" I use this .vimrc and the accompanying git repo of plugins, | |
" colorschemes, and other config files on Windows Vista, | |
" Windows 7, Ubuntu 12.04, and Mac OSX 10.7 on a daily basis. | |
" | |
" Pull requests and comments welcome! | |
"------INSTALLATION--- | |
" $ git clone --recursive https://github.com/brycefisher/vimfiles.git ~/.vim |
NewerOlder