| Filter | Description | Example |
|---|---|---|
| allintext | Searches for occurrences of all the keywords given. | allintext:"keyword" |
| intext | Searches for the occurrences of keywords all at once or one at a time. | intext:"keyword" |
| inurl | Searches for a URL matching one of the keywords. | inurl:"keyword" |
| allinurl | Searches for a URL matching all the keywords in the query. | allinurl:"keyword" |
| intitle | Searches for occurrences of keywords in title all or one. | intitle:"keyword" |
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
| $(document).ready(function() { | |
| // Function to convert an img URL to data URL | |
| function getBase64FromImageUrl(url) { | |
| var img = new Image(); | |
| img.crossOrigin = "anonymous"; | |
| img.onload = function () { | |
| var canvas = document.createElement("canvas"); | |
| canvas.width =this.width; | |
| canvas.height =this.height; | |
| var ctx = canvas.getContext("2d"); |
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
| const version = 1; | |
| const appPrefix = 'myApp-'; | |
| const staticCacheName = appPrefix + 'static-v' + version; | |
| const imagesCacheName = appPrefix + 'content-imgs'; | |
| var allCaches = [ | |
| staticCacheName, | |
| imagesCacheName | |
| ]; | |
| self.addEventListener('message', event => { |
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 | |
| namespace App\Helpers\File; | |
| use Illuminate\Http\File; | |
| use Illuminate\Http\UploadedFile; | |
| use Illuminate\Support\Arr; | |
| class FileHelper | |
| { |
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 | |
| /* | |
| 参考自: | |
| http://darklaunch.com/2010/09/01/http-status-codes-in-php-http-header-response-code-function | |
| http://snipplr.com/view/68099/ | |
| */ | |
| function HTTPStatus($num) { | |
| $http = array( |
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 drawCircle(text, size, color) { | |
| var textSize = Math.ceil(size / 2.5); | |
| var font = 'Proxima Nova, proxima-nova, HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif'; | |
| var colors = ["#1abc9c", "#16a085", "#f1c40f", "#f39c12", "#2ecc71", "#27ae60", "#e67e22", "#d35400", "#3498db", "#2980b9", "#e74c3c", "#c0392b", "#9b59b6", "#8e44ad", "#bdc3c7", "#34495e", "#2c3e50", "#95a5a6", "#7f8c8d", "#ec87bf", "#d870ad", "#f69785", "#9ba37e", "#b49255", "#b49255", "#a94136"]; | |
| var colorIndex = Math.floor((text.charCodeAt(0) - 65) % colors.length); | |
| var finalColor = color || colors[colorIndex]; | |
| var template = [ | |
| '<svg height="' + size + '" width="' + size + '" style="background: ' + finalColor + '">', | |
| '<text text-anchor="middle" x="50%" y="50%" dy="0.35em" fill="white" font-size="' + textSize + '" font-family="' + font + '">' + text.toUpperCase() + '</text>', |
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
| public function phpRule_ValidarRut($rut) { | |
| // Verifica que no esté vacio y que el string sea de tamaño mayor a 3 carácteres(1-9) | |
| if ((empty($rut)) || strlen($rut) < 3) { | |
| return array('error' => true, 'msj' => 'RUT vacío o con menos de 3 caracteres.'); | |
| } | |
| // Quitar los últimos 2 valores (el guión y el dígito verificador) y luego verificar que sólo sea | |
| // numérico | |
| $parteNumerica = str_replace(substr($rut, -2, 2), '', $rut); |
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 | |
| /** | |
| * JSON Web Token implementation | |
| * | |
| * Minimum implementation used by Realtime auth, based on this spec: | |
| * http://self-issued.info/docs/draft-jones-json-web-token-01.html. | |
| * | |
| * @author Neuman Vong <neuman@twilio.com> | |
| */ | |
| class JWT |
Más información - Docs Oficiales
- Instalar TypeScript y tipos de Node, como dependencia de desarrollo
npm i -D typescript @types/node
- Inicializar el archivo de configuración de TypeScript ( Se puede configurar al gusto)
OlderNewer