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
| diff --git a/node_modules/postgraphile/build/postgraphile/http/createPostGraphileHttpRequestHandler.js b/node_modules/postgraphile/build/postgraphile/http/createPostGraphileHttpRequestHandler.js | |
| index 73bc159..1b1d23d 100644 | |
| --- a/node_modules/postgraphile/build/postgraphile/http/createPostGraphileHttpRequestHandler.js | |
| +++ b/node_modules/postgraphile/build/postgraphile/http/createPostGraphileHttpRequestHandler.js | |
| @@ -717,7 +717,14 @@ function createPostGraphileHttpRequestHandler(options) { | |
| operationName, | |
| }, (graphqlContext) => { | |
| pgRole = graphqlContext.pgRole; | |
| - const graphqlResult = graphql_1.execute(gqlSchema, queryDocumentAst, null, graphqlContext, variables, operationName); | |
| + const graphqlResult = graphql_1.execute({ |
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
| Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) Chrome/ | |
| Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) | |
| Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/W.X.Y.Z Mobile Safari/537.36 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) | |
| Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) Chrome/W.X.Y.Z Safari/537.36 | |
| Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/W.X.Y.Z Mobile Safari/537.36 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) | |
| Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; MicrosoftPreview/2.0; +https://aka.ms/MicrosoftPreview) Chrome/W.X.Y.Z Safari/537.36 | |
| Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/W.X.Y.Z Mobile Safari/537.36 (compatible; MicrosoftPre |
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
| declare module 'meteor/matb33:collection-hooks' { | |
| import { Meteor } from "meteor/meteor" | |
| type TGlobalOptions = { | |
| all?: any | |
| insert?: any | |
| update?: any | |
| upsert?: any | |
| find?: any | |
| findOne?: any | |
| remove?: any |
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
| #!/usr/bin/env bash | |
| # 1. Use bash. Using zsh or fish or any other, will make it hard for others to understand / collaborate. Among all shells, bash strikes a good balance between portability and DX. | |
| # 2. Just make the first line be #!/usr/bin/env bash, even if you don’t give executable permission to the script file. | |
| # 3. Use the .sh (or .bash) extension for your file. It may be fancy to not have an extension for your script, but unless your case explicitly depends on it, you’re probably just trying to do clever stuff. Clever stuff are hard to understand. | |
| # 4. When a command fails, bash exits instead of continuing with the rest of the script. | |
| set -o errexit | |
| # 5. This will make the script fail, when accessing an unset variable. | |
| set -o nounset | |
| # 6. This will ensure that a pipeline command is treated as failed, even if one command in the pipeline fails. | |
| set -o pipefail |
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
| #!/bin/sh | |
| for ENV_VAR in $(echo $ENV_LIST | tr "," "\n") | |
| do | |
| if grep -q "^$ENV_VAR=" .env; then | |
| sed -i "s/$ENV_VAR=.*/$ENV_VAR=$(printenv $ENV_VAR)/g" .env | |
| else | |
| echo "$ENV_VAR=$(printenv $ENV_VAR)" >> .env | |
| fi | |
| done |
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
| #!/usr/bin/env bash | |
| if [ "$#" -ne 2 ]; then | |
| echo "webm-to-mp3 [input.webm] [output.mp3]" | |
| exit | |
| fi | |
| ffmpeg -i "$1" -vn -ab 128k -ar 44100 -y "$2"; | |
| # Requirements: ffmpeg | |
| # Save to: /usr/local/bin/webm-to-mp3 |
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
| /** | |
| * Convert number to text | |
| * | |
| * @param number | |
| * @param prefix | |
| */ | |
| function numberToText(number, prefix = '') { | |
| // số, tên thường, tên hàng chục > 20, tên hàng chục > 10, =< 20 | |
| let range1 = [ | |
| [0, 'không', '', ''], |
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 | |
| require_once 'app/Mage.php'; | |
| Mage::app(); | |
| $allCategories = Mage::getModel ( 'catalog/category' ); | |
| $categoryTree = $allCategories->getTreeModel(); | |
| $categoryTree->load(); | |
| $categoryIds = $categoryTree->getCollection()->getAllIds (); | |
| if ($categoryIds) { | |
| $outputFile = "var/export/categories.csv"; | |
| $write = fopen($outputFile, 'w'); |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <script id="jsbin-javascript"> |
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 code is public domain, share and enjoy. --> | |
| <html> | |
| <style type="text/css" media="screen"> | |
| #table { | |
| position: absolute; | |
| top: 30px; | |
| bottom: 0; | |
| left: 10px; | |
| right: 10px; | |
| } |