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
| MYSQL_ROOT_PASSWORD=admin | |
| MYSQL_USER=admin | |
| MYSQL_PASSWORD=123 | |
| REPLICATION_USER=replication_user | |
| REPLICATION_PASSWORD=myreplpassword | |
| MYSQL_SLAVE_ONE_ROOT_PASSWORD=admin | |
| MYSQL_SLAVE_ONE_USER=slave | |
| MYSQL_SLAVE_ONE_PASSWORD=mysqlpwd |
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
| version: '2' | |
| services: | |
| mysql_db_master: | |
| image: mysql:5.7 | |
| environment: | |
| MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} | |
| MYSQL_USER: ${MYSQL_USER} | |
| MYSQL_PASSWORD: ${MYSQL_PASSWORD} | |
| MYSQL_ROOT_HOST: 0.0.0.0 | |
| ports: |
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 | |
| add_filter( 'rest_authentication_errors', function( $result ) { | |
| if ( ! empty( $result ) ) { | |
| return $result; | |
| } | |
| if ( ! is_user_logged_in() ) { | |
| return new WP_Error( 'rest_not_logged_in', 'You are not currently logged in.', array( 'status' => 401 ) ); | |
| } | |
| if ( ! current_user_can( 'administrator' ) ) { |
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 | |
| $text = 'sadasda{test}aasdasa asda {test2}'; | |
| preg_match_all("/{[^.}]*}/", $text, $var); | |
| //$var = str_ireplace(['{', '}'], '', $var[0][0]); | |
| var_dump($var); |
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
| pages: | |
| stage: deploy | |
| script: | |
| - curl -o "docgen" https://raw.githubusercontent.com/thedevsaddam/docgen-bin/master/latest/linux_amd64 | |
| - chmod +x ./docgen | |
| - ./docgen build -i collection.json -o ./index.html | |
| - mkdir .public | |
| - cp -r index.html .public | |
| - mv .public public | |
| - rm docgen |
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
| import pandas as pd | |
| import requests | |
| import json | |
| import sched, time | |
| import base64 | |
| from bs4 import BeautifulSoup as BSHTML | |
| # print(df.to_json(orient = 'index', indent = 2)) | |
| # print(df.to_json(orient='records', indent = 2)) |
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
| import boto3 | |
| s3 = boto3.client('s3') | |
| for obj in s3.list_objects_v2(Bucket="lms10", Prefix="adm/")['Contents']: | |
| print(obj['Key']) |
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
| server { | |
| server_name server.com; | |
| root /var/www/html/backend/public; | |
| index index.html index.php; | |
| location / { | |
| try_files $uri $uri/ /index.php?$query_string; | |
| } |
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
| package main | |
| import ( | |
| "io" | |
| "log" | |
| "net/http" | |
| ) | |
| func d(res http.ResponseWriter, req *http.Request) { | |
| io.WriteString(res, "dog dog dog") |
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
| $ cd /Applications/MAMP/Library/bin/ | |
| $ ./mysqldump --host=localhost -uroot -proot source_database > ~/Desktop/database_name-dump.sql |