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
[user] | |
name = Oskar Szrajer | |
email = [email protected] | |
[alias] | |
br = branch | |
co = checkout | |
ci = commit | |
df = diff | |
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit |
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 | |
/** | |
* Creates a thumbnail for any type of pre-existing image. Always saves as PNG image | |
* Works properly with GIF transparency and PNG Alpha Transparency. | |
* If Image is less than max_width and max_height it will stay at the size of the image. | |
* | |
* @param string - The location of the pre-existing image. | |
* @param string - The location to save the thumbnail, including filename and extension. |
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 | |
// need a true/false return if a needle is found. | |
$haystack = "this is the haystack/string full of goodness needle 1 needle 2"; // haystack | |
$needles = array("needle 1", "needle 2", "needle 3"); // needles | |
foreach ($needles as $key => $val) { | |
if (strpos($haystack, $val)) { | |
// do something | |
echo 'found match'; |