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
Just use: | |
CTRL + C |
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
//.htaccess code | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php?url=$1 [L,QSA] | |
//PHP part |
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
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); | |
echo $lang; |
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 | |
use ReCaptchaSecureToken\ReCaptchaToken as ReCaptchaToken; | |
require_once("ReCaptchaToken.php"); | |
//Generate recaptcha token | |
$recaptcha_config = [ | |
'site_key' => 'your-site-key', | |
'site_secret' => 'your-site-secret-key' | |
]; | |
$recaptcha_token = new ReCaptchaToken($recaptcha_config); |
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
/* CSS Document */ | |
html { | |
-webkit-filter: invert(100%) hue-rotate(270deg) brightness(100%) contrast(100%); | |
background: #222; | |
} |
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
uasort($array_to_sort, function($a, $b) | |
{ | |
return $a['order'] - $b['order']; | |
}); |
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
/** | |
* find out if child is first level child of given GO | |
* @return Transform | |
**/ | |
bool IsFirstLevelChildOf(Transform root, Transform child) | |
{ | |
bool isFirstLevel = false; | |
var children = root.GetComponentsInChildren<Transform>(); | |
foreach(var c in children) { | |
if (c.parent == root && c == child) { |
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
void Start () | |
{ | |
StartCoroutine (LateStart()); | |
} | |
IEnumerator LateStart() | |
{ | |
yield return new WaitForEndOfFrame (); | |
// Do your magic 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
phonegap plugin add cordova-plugin-app-version --save | |
/* | |
'--save' command also saves the plugin in the config.xml | |
*/ |
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 theParentGO = GameObject.Find("ParentName"); | |
theParentGO.transform.GetComponentInChildren<ScriptOnTheChild>(true).gameObject; |