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
| git config --global alias.preview-pull '!f() { | |
| BRANCH=$(git rev-parse --abbrev-ref HEAD); | |
| REMOTE=${1:-origin}; | |
| echo "🔎 Fetching $REMOTE..."; | |
| git fetch $REMOTE || return; | |
| echo ""; | |
| echo "📌 Branch atual: $BRANCH"; | |
| echo "📌 Comparando com: $REMOTE/$BRANCH"; |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| char* urlencode(char* originalText) | |
| { | |
| // allocate memory for the worst possible case (all characters need to be encoded) | |
| char *encodedText = (char *)malloc(sizeof(char)*strlen(originalText)*3+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
| <?php | |
| /* | |
| The aim is to create a functional server monitor based on the one | |
| showed on Mark Zuckerberg's monitor on The Social Network movie. | |
| Run so: | |
| php monitor.php | |
| Notes: | |
| - The server LogFormat must be "Common Log Format" (%h %^[%d:%^] "%r" %s %b) |
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 | |
| /* | |
| Based on CmdLine UDF for AutoIt (also mine): https://www.autoitscript.com/forum/topic/169610-cmdline-udf-get-valueexistenceflag/ | |
| */ | |
| class cmdline { | |
| function get($sKey, $mDefault = Null) { | |
| global $argv,$argc; | |
| for($i = 1; $i <= ($argc-1); $i++) { |
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
| /** | |
| * Calculates the Modulo 11 for generating the verification digit of bank slips and bank accounts. | |
| * | |
| * @author Pablo Costa <pablo@users.sourceforge.net> | |
| * @link www.febraban.org.br | |
| * | |
| * @param {string} num Numeric string for which the verification digit is to be calculated. | |
| * @param {number} [base=9] Maximum value of multiplication. | |
| * @param {number} [r=0] Specifies the return type. If 0, returns the verification digit, if 1 returns the remainder. | |
| * |
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 | |
| // Firebase Cloud Messaging Authorization Key | |
| define('FCM_AUTH_KEY', 'your key here'); | |
| function sendPush($to, $title, $body, $icon, $url) { | |
| $postdata = json_encode( | |
| [ | |
| 'notification' => | |
| [ |
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
| /* | |
| * Javascript makeslug() | |
| * by J. Santos <jefrey[at]jefrey[dot]ml> | |
| */ | |
| /* | |
| Usage: | |
| string makeslug( string val [, string replaceBy = "-" ] ) | |
| Example: |
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 parse_block($block) { | |
| $return = [ | |
| 'version' => null, | |
| 'prevBlockHash' => null, | |
| 'merkleRoot' => null, | |
| 'timestamp' => null, | |
| 'target' => null, | |
| 'nonce' => null |
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,body { | |
| height: 100%; | |
| user-select: none; | |
| } | |
| .container-fixed { | |
| bottom: 0; | |
| position: fixed; | |
| left: 0; | |
| right: 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
| ; https://www.autoitscript.com/forum/topic/193141-storageau3-localstorage-and-sessionstorage/ | |
| ; sessionStorage (temporary) | |
| ; add or modify a key | |
| sessionStorage("foo", "bar") | |
| store("foo", "bar") | |
| sessionStorage_set("foo", "bar") | |
| sessionStorage_setItem("foo", "bar") |
NewerOlder