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
<!doctype html> | |
<!--[if lt IE 7]> | |
<html class="nojs ms lt_ie7" lang="en"><![endif]--> | |
<!--[if IE 7]> | |
<html class="nojs ms ie7" lang="en"><![endif]--> | |
<!--[if IE 8]> | |
<html class="nojs ms ie8" lang="en"><![endif]--> | |
<!--[if gt IE 8]> |
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 | |
$img = \imagecreatefromjpeg('someimage.jpg'); | |
for ($y = 0; $y < imagesy($img); $y++) { | |
for ($x = 0; $x < imagesx($img); $x++) { | |
// find color index at x,y | |
$pixelColorIndex = imagecolorat($img, $x, $y); | |
$pixelColorRGB = imagecolorsforindex($img, $pixelColorIndex); | |
// set new color if test color matches | |
if ($pixelColorRGB['red'] == 255 && $pixelColorRGB['green'] == 255 && $pixelColorRGB['blue'] == 255) { |
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 | |
$tokenUrl = 'https://graph.facebook.com/oauth/access_token?client_id={client_id}&client_secret={client_secret}&grant_type=client_credentials'; | |
$token = file_get_contents($tokenUrl); | |
$postsUrl = 'https://graph.facebook.com/{page_id or slug}/posts?' . $token; | |
$postsJson = file_get_contents($postsUrl); | |
$posts = json_decode($postsJson); |
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
#!/bin/bash | |
set -o errexit | |
# Author: David Underhill | |
# Script to permanently delete files/folders from your git repository. To use | |
# it, cd to your repository's root and then run the script with a list of paths | |
# you want to delete, e.g., git-delete-history path1 path2 | |
if [ $# -eq 0 ]; then | |
exit 0 |
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
$('[name="playa[channels][]"] option').each(function() { | |
var optionText = $(this).text().toLowerCase(); | |
if(optionText.indexOf("team") !== -1 || optionText.indexOf("people") !== -1) { | |
$(this).attr('selected', 'selected'); | |
} | |
}); |
NewerOlder