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
--- | |
version: "2" | |
plugins: | |
phpmd: | |
enabled: true | |
config: | |
file_extensions: | |
- php | |
- inc | |
- module |
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
<?php | |
if (php_sapi_name() == 'cli' && empty($argv[1])) { | |
dd("Pass a file name as an argument. \n\n ./index.php filename.csv"); | |
} | |
//*********** Sitemap Processor Class *********** | |
class SitemapProcessor { | |
private $paths; | |
private $json; |
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
import csv | |
import requests | |
import json | |
import time | |
from pprint import pprint | |
itunes = "https://api.appmonsta.com/v1/stores/itunes/details/" | |
android = "https://api.appmonsta.com/v1/stores/android/details/" | |
api_key = "API_KEY" |
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
{ | |
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36", | |
"environment": { | |
"networkUserAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3694.0 Mobile Safari/537.36 Chrome-Lighthouse", | |
"hostUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36", | |
"benchmarkIndex": 748 | |
}, | |
"lighthouseVersion": "5.4.0", | |
"fetchTime": "2019-10-02T20:38:03.459Z", | |
"requestedUrl": "http://dev-example-site-1.pantheonsite.io/", |
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
exclude_paths: | |
- "/vendor/*" | |
engines: | |
phpcodesniffer-drupal: | |
enabled: true | |
config: | |
file_extensions: "php,module,inc,install,test,profile,theme,js,css,info,txt,md" | |
standard: "Drupal,DrupalPractice" | |
ratings: | |
paths: |
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
if (obj.status == 902) { | |
set obj.status = 301; | |
set obj.http.location = "https://domain.com" obj.response; | |
set obj.response = "Moved Permanently"; | |
synthetic {""}; | |
return (deliver); | |
} |
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
// ==UserScript== | |
// @name Add MySQL Link | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description Just give me a link. | |
// @author Kyle Taylor | |
// @match https://*.dashboard.pantheon.io/sites/* | |
// @grant none | |
// ==/UserScript== |
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
# Python 3 code to rename multiple | |
# files in a directory or folder | |
# importing os module | |
import os | |
from shutil import copyfile | |
# Function to rename multiple files | |
def main(): | |
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
import requests | |
from dotenv import load_dotenv | |
from netaddr import IPAddress | |
import os | |
import pickledb | |
import codecs | |
import csv | |
import argparse | |
from tqdm import tqdm | |
from pprint import pprint |
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
// ==UserScript== | |
// @name Pantheon WebOps Trick | |
// @namespace https://kyletaylor.dev | |
// @version 0.3 | |
// @description Always be wow-ing. | |
// @author Kyle Taylor | |
// @match https://dashboard.pantheon.io/sites/* | |
// @grant none | |
// ==/UserScript== |