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 | |
/** | |
* Static Class that returns PHP arrays of US State names, and US Cities names by state. | |
* | |
* @author Jonathan Cutrer ([email protected]) | |
* @license Public Domain | |
* @link https://gist.github.com/joncutrer/8384846 | |
* | |
* | |
* Usage Examples |
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
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-scroll-header-panel/core-scroll-header-panel.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; |
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
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-field/core-field.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-input/core-input.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> |
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/sh | |
# Inspect a jpg|png image and provide an estimate of processing time and memory requirements | |
# to compress the image with guetzli | |
# |
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 psutil | |
# | |
# Python Script to Check if... | |
# Windows Service is found|installed,stopped|running without pywin32 | |
# Found at https://stackoverflow.com/questions/33843024 | |
# Update to work on python 3.x | |
# | |
def getService(name): |
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 | |
/** | |
* This is NOT WORKING CODE but is provided for reference. This is the portion of | |
* code that was used on mwcsvimport.pronique.com to take a csv dataset and template | |
* file and generate a mediawiki xml import file. | |
* | |
* mwcsvimport.pronique.com was shutdown on 12/15/2018 but this code | |
* is provided for inspection by anyone looking to recreate it's | |
* functionality. | |
* |
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/env python3 | |
"""scapy-arp-listener.py | |
Listen for arp packets using scapy to learn the IP and Mac Address of LAN hosts | |
Copyright (C) 2018 Jonathan Cutrer | |
License Dual MIT, 0BSD | |
""" |
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/env python3 | |
"""scapy-dhcp-listener.py | |
Listen for DHCP packets using scapy to learn when LAN | |
hosts request IP addresses from DHCP Servers. | |
Copyright (C) 2018 Jonathan Cutrer | |
License Dual MIT, 0BSD |
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 itertools | |
x = [1, 2, 3, 4, 5, 6] | |
# output all permutations of x | |
print(list(itertools.permutations(x, 2))) |
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 | |
# Install WordPress CLI | |
# Must be run as root for permission to write to /usr/local/bin | |
# | |
dl_url=https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
tmp_dir=$(mktemp -d -t wpcli-XXXXXXXXXX) | |
curl -o $tmp_dir/wp-cli.phar $dl_url | |
chmod +x $tmp_dir/wp-cli.phar | |
mv $tmp_dir/wp-cli.phar /usr/local/bin/wp | |
rm -rf $tmp_dir |
OlderNewer