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
| function countDown() { | |
| var startDateTime = new Date(); | |
| var endDateTime = new Date("March 9,2015 18:00:00"); | |
| var left = endDateTime - startDateTime; | |
| var a_day = 24 * 60 * 60 * 1000; | |
| var h = Math.floor((left % a_day) / (60 * 60 * 1000)), | |
| m = Math.floor((left % a_day) / (60 * 1000)) % 60, | |
| s = Math.floor((left % a_day) / 1000) % 60 % 60; |
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
| $accessToken = $app_Id.'|'.$app_accessToken; | |
| $url = "https://graph.facebook.com/{$facebookId}/notifications"; // API URL | |
| $linkUrl = "index.php"; // appๅ ใฎ็ธๅฏพURL | |
| $notificationTemplate = "Test"; | |
| // POST params | |
| $params = "access_token={$accessToken}"; | |
| $params .= "&href={$linkUrl}"; | |
| $params .= "&template={$notificationTemplate}"; |
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
| a { | |
| -webkit-tap-highlight-color: rgba(0, 0, 0, 0); | |
| -moz-tap-highlight-color: rgba(0, 0, 0, 0); | |
| tap-highlight-color: rgba(0, 0, 0, 0); | |
| } |
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
| // #contents { min-height: } | |
| function getBrowserHeight() { | |
| if ( window.innerHeight ) { | |
| return window.innerHeight; | |
| } | |
| else if ( document.documentElement && document.documentElement.clientHeight != 0 ) { | |
| return document.documentElement.clientHeight; | |
| } | |
| else if ( document.body ) { | |
| return document.body.clientHeight; |
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
| SELECT (YEAR(current_date())-YEAR(`dob`)) - (RIGHT(current_date(),5) < RIGHT(`dob`,5)) AS age | |
| FROM `table_name` |
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
| ini_set('xdebug.var_display_max_data', 4096); | |
| ini_set('xdebug.var_display_max_depth', 20); | |
| var_dump(); |
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 | |
| // Create connection | |
| $mysqli = new mysqli('HOST', 'USER', 'PW'); | |
| // Check connection | |
| if ($mysqli->connect_errno) { | |
| printf("Connect failed: %s\n", $mysqli->connect_error); | |
| exit(); | |
| } | |
| // Check DB server | |
| if ($mysqli->ping()) { |
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
| โโโโ | |
| โโ โ | |
| โ โ | |
| โ โ | |
| โ โ | |
| โ โ | |
| โโ โโ | |
| โโโโโ | |
| โโโโโ | |
| โโโโโ |
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
| require 'net/http' | |
| require 'uri' | |
| require 'json' | |
| uri = URI.parse("https://hooks.slack.com/services/****") | |
| payload = { | |
| text: "ใใใชใใใใงใใใ", | |
| channel: "@dareka", | |
| username: "oreore", | |
| icon_emoji: ":ghost:" |
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
| # format all | |
| $ nginx -V 2>&1 | sed 's/--/\n--/g' | |
| # format module only | |
| $ nginx -V 2>&1 | sed 's/--with/\n--with/g' |
OlderNewer