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
/** | |
* Scans folder and adds all folders to array. | |
* | |
* @param string $path folder path | |
* @return array found folders in array | |
*/ | |
function get_folders($path) { | |
$folders = scan_dir($path); | |
$import = array(); | |
foreach ($folders as $folder) { |
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
var objs = document.getElementsByTagName('li'); | |
$(objs).hover(function(event) { | |
if (this == event.currentTarget) { | |
console.log('yep'); | |
} else { | |
console.log('nope'); | |
} | |
}); | |
$(objs).click(function(event) { |
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
function newText(obj, text, classy) { | |
var hLen = text.length, | |
firstIdx = text.indexOf(' '), | |
startStr = text.slice(0, firstIdx), | |
endStr = text.slice(firstIdx, hLen), | |
newStr = startStr + '<span class="'+classy+'">' + endStr + '</span>'; | |
$(obj).html(newStr); | |
} |
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
.bkgEnvi { | |
position: relative; | |
z-index: 1; | |
} | |
.moveCloud { | |
position: absolute; | |
top: 10px; | |
right: 50px; | |
z-index: 5; | |
} |
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
define('WP_USE_THEMES', false); | |
require($_SERVER['DOCUMENT_ROOT'] . '/wp-blog-header.php'); | |
header('HTTP/1.1 200 OK'); | |
header('Content-type: application/json;'); | |
$posts = array(); | |
if (have_post()) : | |
while (have_posts()) : | |
$posts = the_post(); | |
$posts['id'] = the_ID(); |
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
/** | |
* Define WP_USE_THEMES | |
* | |
**/ | |
define('WP_USE_THEMES', false); | |
require($_SERVER['DOCUMENT_ROOT'] . '/wp-blog-header.php'); | |
header('HTTP/1.1 200 OK'); | |
header('Content-type: application/json;'); |
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
(function () { | |
var forEach = [].forEach, | |
regex = /^data-(.+)/, | |
dashChar = /\-([a-z])/ig, | |
el = document.createElement('div'), | |
mutationSupported = false, | |
match | |
; | |
function detectMutation() { |
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
Failure/Error: Unable to find matching line from backtrace | |
ActiveRecord::StatementInvalid: | |
PGError: ERROR: syntax error at or near "IDENTITY" | |
LINE 1: TRUNCATE TABLE RESTART IDENTITY CASCADE; | |
^ | |
: TRUNCATE TABLE RESTART IDENTITY CASCADE; |
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
Autosave from Chrome Notes: | |
Watch: http://addyosmani.com/blog/autosave-changes-chrome-dev-tools/ | |
Installation Instructions: https://github.com/NV/chrome-devtools-autosave | |
Afraid of Node? Here's a one-click install: https://sites.google.com/site/nodejsmacosx/ | |
To monitor changes, you have to run `node chrome-devtools-autosave-server/index.js` in the Terminal. This is hard to remember, | |
so create an alias. Run |
OlderNewer