- Goto Google Developer Console
- Make New Project
- Enable Analytics API
- In Credentials Menu item create new Service Account with P12 option
- Download P12 file and copy Email Address that Service Account give you
- Goto Google Analytics Account
- Create New property for your site
- In Analytics panel in ACCOUNT Column Click User Management Paste Email Address that Service Account get us and click add
- Copy 9 last digit of url in Analytics page of project and we will use it in Google Api Library
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
class Controller { | |
public function search() | |
{ | |
$kelime = $_POST['query']; | |
$result = $this->site_model->search($keyword); | |
foreach ($result as $item) { | |
switch ($item->type) { | |
case 'products': |
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
find * -type d -print0 | xargs -0 chmod 0755 # for directories | |
find . -type f -print0 | xargs -0 chmod 0644 # for files | |
stat -c "%a %n" * # Check permissions |
I hereby claim:
- I am amirkhiz on github.
- I am habil (https://keybase.io/habil) on keybase.
- I have a public key ASDT1ZcD9RZiUQOcrqb1jQ2fewEmmYkquGViyofv9xRJ9Ao
To claim this, I am signing this object:
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
Billy Chia Billy Chia | |
E.164 is the international telephone numbering plan that ensures each device on the PSTN has globally unique number. | |
This is what allows phone calls and text messages can be correctly routed to individual phones in different countries. | |
E.164 numbers are formatted [+] [country code] [subscriber number including area code] and can have a maximum of fifteen digits. | |
Examples of E.164 Numbers | |
E.164 Format Country Code Country Subscriber Number | |
+14155552671 1 US 4155552671 | |
+442071838750 44 GB 2071838750 |
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 | |
function getPotentialDomains( $lines ) { | |
$re = '~((https|http){1}://(www|ww2|web)?(\.)?(([a-z0-9\-])+\.)+([a-z]{2,}){1})~ui'; | |
$domains = []; | |
foreach ( $lines as $line ) { | |
preg_match_all( $re, $line, $matches, PREG_SET_ORDER, 0 ); | |
$domains = array_merge( $domains, $matches ); |
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 | |
// Reference https://codebriefly.com/unique-alphanumeric-string-php/ | |
function unique_code($limit) | |
{ | |
return substr(base_convert(sha1(uniqid(mt_rand())), 16, 36), 0, $limit); | |
} | |
echo unique_code(8); |
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 | |
/** | |
* Reference/source: http://stackoverflow.com/a/1464155/933782 | |
* | |
* I want a short alphanumeric hash that’s unique and who’s sequence is difficult to deduce. | |
* I could run it out to md5 and trim the first n chars but that’s not going to be very unique. | |
* Storing a truncated checksum in a unique field means that the frequency of collisions will increase | |
* geometrically as the number of unique keys for a base 62 encoded integer approaches 62^n. | |
* I’d rather do it right than code myself a timebomb. So I came up with this. | |
* |
OlderNewer