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 python3 | |
import logging | |
import argparse | |
import json | |
import ast | |
import os | |
import re | |
import pandas as pd | |
from graphql import ( | |
parse, |
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/bash | |
set -Eeuxo pipefail | |
# Download Lombok jar | |
VERSION=1.18.34 | |
OUTPUT=$HOME/.local/share/java | |
if [ ! -f $OUTPUT/lombok.jar ]; then | |
mkdir -p $OUTPUT | |
wget "https://repo1.maven.org/maven2/org/projectlombok/lombok/$VERSION/lombok-$VERSION.jar" -O $OUTPUT/lombok.jar | |
fi |
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 python3 | |
import argparse | |
import logging | |
import sys | |
import json | |
import re | |
def find_tasks(data, name=None): | |
for task in data["data"]: |
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 python | |
# | |
# Input: https://getpocket.com/export | |
# Output: Importable bookmarks HTML file | |
# | |
# Usage: | |
# ./pocket_to_safari.py "2017-11-30 - Pocket Export" < ril_export.html > pocket.html | |
# | |
import sys | |
from bs4 import BeautifulSoup |
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 python | |
from nltk.corpus import brown | |
import argparse | |
def is_valid(name, word, tag=None, allowed_parts_of_speech=None): | |
""" | |
Tests if allowed part of speech and is alliterative | |
""" |
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/bash | |
SQL=$(cat << EOF | |
SELECT | |
table_schema as \`Database\`, | |
table_name AS \`Table\`, | |
round(((data_length + index_length) / 1024 / 1024), 2) \`Size in MB\` | |
FROM information_schema.TABLES | |
ORDER BY (data_length + index_length) DESC; | |
EOF) |
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 python3 | |
# | |
# A script that runs the commands to perform Netflix's | |
# "Linux Performance Analysis in 60,000 Milliseconds" | |
# | |
# (http://techblog.netflix.com/2015/11/linux-performance-analysis-in-60s.html) | |
# | |
# First install Performance monitoring tools for Linux | |
# `apt install sysstat` | |
# |
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/bash | |
GROUP=$1 | |
ARTIFACT=$2 | |
APP_NAME=$3 | |
PACKAGE=`echo $APP_NAME | awk '{print tolower($0)}'` | |
echo "Creating application $PACKAGE.$APP_NAME $GROUP:$ARTIFACT" | |
mvn archetype:generate \ |
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 python | |
import sys | |
import os | |
if len(sys.argv) != 2: | |
print 'usage: project_name' | |
sys.exit(1) | |
name = sys.argv[1] | |
name_no_hyphen = name.replace('-', '') |
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 io.dropwizard.Application; | |
import io.dropwizard.Configuration; | |
import io.dropwizard.cli.ServerCommand; | |
import io.dropwizard.configuration.ConfigurationFactory; | |
import io.dropwizard.setup.Bootstrap; | |
import io.dropwizard.setup.Environment; | |
import org.eclipse.jetty.server.Server; | |
import org.eclipse.jetty.util.component.AbstractLifeCycle; | |
import org.eclipse.jetty.util.component.LifeCycle; |