⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
function verify_notification_token($token) { | |
$fields = array( | |
'dry_run' => true, | |
'to' => $token, | |
); | |
$headers = array( | |
'Authorization: key=' . GOOGLE_API_SERVER_KEY, | |
'Content-Type: application/json', | |
); | |
$ch = curl_init(); |
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 | |
/* | |
Plugin Name: Bot For WP | |
Description: Messenger bot for WordPress | |
Plugin URI: http://snypd.com/ | |
Author: Sunny Luthra | |
Author URI: http://# | |
Version: 1.0 | |
License: GPL2 | |
*/ |
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 deleteSpam = { | |
count: 0, | |
list: null, | |
timeout: 500, | |
//Selector of cross(x) link | |
crossSelector: '.userContentWrapper [aria-label="Delete"]', | |
//Selector for buttons wrapper in overlay box which appears when we click on cross icon | |
overlayPresenseSelector: '.uiOverlayFooter', | |
//Delete button selector on overlay box | |
confirmDeleteButtonSelector: 'button.layerConfirm', |
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
Array | |
( | |
[avatar] => https://s3.amazonaws.com/photos.angel.co/users/237099-medium_jpg?1382091520 | |
[name] => Pathan Salman Khan | |
[bio] => Graduate from CSE, IITB. Active programmer in Codeforces, TopCoder and Hackerrank and other platforms. | |
[header_links] => Array | |
( | |
[linked_in-link] => http://www.linkedin.com/profile/view?id=84285625&trk=nav_responsive_tab_profile | |
[twitter-link] => https://twitter.com/pathansalman | |
[facebook-link] => http://www.facebook.com/pskhan1 |
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 | |
/** | |
* Character Limiter | |
* | |
* Limits the string based on the character count. Preserves complete words | |
* so the character count may not be exactly as specified. | |
* | |
* @access public | |
* @param string | |
* @param integer |
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 | |
$args = array( | |
'meta_query' => array( | |
'relation' => 'OR', | |
array( | |
'key' => 'skill', | |
'value' => 'php', | |
'compare' => '=' | |
), |
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 | |
if ('on' == $_SERVER['HTTPS']) { | |
//Yes, HTTPS request. | |
else{ | |
//Http request | |
} | |
?> |
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 | |
function get_user_id_by_meta($key, $value) { | |
if (!$key && !$value) { | |
return false; | |
} | |
$args = array( | |
'meta_key' => $key, | |
'meta_value' => $value, | |
'fields' => 'ids', | |
'count_total' => false, |
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
@mixin class-generator($classNamespace, $fromValue, $toValue, $multiple, $property, $unit) { | |
@for $i from $fromValue to $toValue { | |
.#{$classNamespace}#{$i*$multiple} { | |
#{$property}: #{$i*$multiple}#{$unit}; | |
} | |
} | |
} | |
@include class-generator(pt, 0, 25, 5, padding-top, px); |
NewerOlder