This file contains 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/python | |
# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
# | |
# Licensed under the Amazon Software License (the "License"). You may not use | |
# this file except in compliance with the License. A copy of the License is | |
# located at http://aws.amazon.com/asl/ or in the "license" file accompanying | |
# this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR | |
# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific | |
# language governing permissions and limitations under the License. |
This file contains 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
# setup file | |
# run as admin | |
import os | |
cwd = os.getcwd() | |
mysql_dir = cwd.replace("\\", '/') | |
mysql_ini_file = "my.ini" |
This file contains 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
// usage example | |
import { graphql, GraphqlQuery } from './obj-to-graphql'; | |
const bookingsQuery: GraphqlQuery = { | |
name: 'bookings', | |
args: { | |
page: 1, | |
filter: { from: '2020-02-02' }, | |
}, | |
select: { |
This file contains 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/bash | |
// note: there is no error handling in this script, recommened way is to execute commands one by one | |
sudo apt -y update | |
sudo apt -y upgrade | |
sudo apt -y install wget |
This file contains 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
DROP FUNCTION IF EXISTS SPLIT_STRING; | |
DROP FUNCTION IF EXISTS SIMILAR_WORDS; | |
DELIMITER $$ | |
CREATE FUNCTION SPLIT_STRING(str VARCHAR(255), delim VARCHAR(12), pos INT) | |
RETURNS VARCHAR(255) | |
RETURN REPLACE(SUBSTRING(SUBSTRING_INDEX(str, delim, pos), | |
LENGTH(SUBSTRING_INDEX(str, delim, pos-1)) + 1), | |
delim, ''); |