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
| { | |
| "boot": { | |
| "prefix": "css", | |
| "body": [ | |
| "/**", | |
| " *", | |
| " * Copyright 2016 Andre Goncalves. All rights reserved.", | |
| " *", | |
| "*/", | |
| "", |
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
| { | |
| "html boilerplate": { | |
| "prefix": "html", | |
| "body": [ | |
| "<doctype html>", | |
| "<head>", | |
| "\t<meta charset=\"utf-8\">", | |
| "\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">", | |
| "\t<meta name=\"author\" content=\"Andre Goncalves\" />", | |
| "\t<meta name=\"viewport\" content=\"width=device-width,minimum-scale=1\">", |
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
| { | |
| "comment block": { | |
| "prefix": "comment", | |
| "body": [ | |
| "/* ", | |
| " * --------------------------------------------------------------------", | |
| " * ${title}", | |
| " * --------------------------------------------------------------------", | |
| " * ${description}", | |
| " *", |
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
| // Place your settings in this file to overwrite the default settings | |
| { | |
| "editor.insertSpaces": false, | |
| "editor.fontFamily": "Menlo, Monaco, Menlo, 'Courier New', monospace", | |
| "editor.fontSize": 14, | |
| "workbench.editor.enablePreviewFromQuickOpen": false, | |
| "editor.fontSize": 12, | |
| "editor.rulers": [120], | |
| } |
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
| // Place your key bindings in this file to overwrite the defaults | |
| [ | |
| { | |
| "key": "cmd+t", | |
| "command": "workbench.action.quickOpen" | |
| }, | |
| { | |
| "key": "cmd+p", | |
| "command": "workbench.action.showAllSymbols" | |
| }, |
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
| create user <user>@localhost; | |
| set password for <user>@localhost = PASSWORD("xxx"); | |
| grant all privileges on wordpress_<app>.* to <user>@localhost identified by "xxx"; | |
| flush privileges; |
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 | |
| // (string) $message - message to be passed to Slack | |
| // (string) $room - room in which to write the message, too | |
| // (string) $icon - You can set up custom emoji icons to use with each message | |
| public static function slack($message, $room = "engineering", $icon = ":longbox:") { | |
| $room = ($room) ? $room : "engineering"; | |
| $data = "payload=" . json_encode(array( | |
| "channel" => "#{$room}", | |
| "text" => $message, |
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
| /** | |
| * -------------------------------------------------------------------- | |
| * jQuery compatibility layer | |
| * -------------------------------------------------------------------- | |
| */ | |
| window.$ = document.querySelectorAll.bind(document); | |
| Node.prototype.on = window.on = function (name, fn) { | |
| this.addEventListener(name, fn); | |
| }; | |
| NodeList.prototype.on = NodeList.prototype.addEventListener = function (name, fn) { |
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 wait (timeout) { | |
| return new Promise((resolve) => { | |
| setTimeout(() => { | |
| resolve() | |
| }, timeout) | |
| }) | |
| } | |
| async function requestWithRetry (url) { | |
| const MAX_RETRIES = 10 |
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
| # Verify captcha | |
| $post_data = http_build_query( | |
| array( | |
| 'secret' => CAPTCHA_SECRET, | |
| 'response' => $_POST['g-recaptcha-response'], | |
| 'remoteip' => $_SERVER['REMOTE_ADDR'] | |
| ) | |
| ); | |
| $opts = array('http' => | |
| array( |