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 | |
/** | |
* Fetch content from an url using curl | |
* | |
* @param string $url The URL to fetch content from | |
* @param array $curlOptions Curl options | |
* | |
* @return bool|mixed Returns false if operation fails, else returns content | |
*/ |
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 | |
/** | |
* Created by PhpStorm. | |
* User: anjan | |
* Date: 9/30/15 | |
* Time: 9:23 AM | |
*/ | |
namespace me\anjan\Utils; |
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 | |
/** | |
* Created by PhpStorm. | |
* User: anjan | |
* Date: 11/25/15 | |
* Time: 9:21 PM | |
*/ | |
$host = 'localhost'; | |
$user = 'root'; |
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
# copy existing libquazip.so.1.0.0 as libquazip.so.0 | |
# this will make screencloud happy and run merrily | |
cd /usr/lib/x86_64-linux-gnu/ | |
sudo cp libquazip.so.1.0.0 libquazip.so.0 | |
# life's good! ehh? |
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
#!/usr/bin/env bash | |
# --------------------------------------------------------------------- | |
# This script exports committed files to git repo using a commit id | |
# You can pass the commit id as the first param, if no param is passed | |
# the latest commit id will be used | |
# --------------------------------------------------------------------- | |
# first check if we have a git repo here! |
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
^rgba\(([0]*[0-9]{1,2}|[1][0-9]{2}|[2][0-4][0-9]|[2][5][0-5])\s*,\s*([0]*[0-9]{1,2}|[1][0-9]{2}|[2][0-4][0-9]|[2][5][0-5])\s*,\s*([0]*[0-9]{1,2}|[1][0-9]{2}|[2][0-4][0-9]|[2][5][0-5])\s*,\s*([0-9]*\.?[0-9]+)\)$ |
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 | |
/** | |
* Is Valid RGBA color? | |
* | |
* @param $colorString | |
* | |
* @return bool |
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
/** | |
* Is the given string a valid RGBA color? | |
* | |
* @param colorString | |
* | |
* @returns {boolean} | |
*/ | |
function isValidRgbaColorFormat(colorString) { |
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 | |
/** | |
* Gets the thumbnail url for a vimeo video using the video id. This only works for public videos. | |
* | |
* @param string $id The video id. | |
* @param string $thumbType Thumbnail image size. supported sizes: small, medium (default) and large. | |
* | |
* @return string|bool |
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 | |
/** | |
* Get Vimeo video id from url | |
* | |
* Supported url formats - | |
* | |
* https://vimeo.com/11111111 | |
* http://vimeo.com/11111111 |