# Find file if we dont have the full path
git log --diff-filter=D --summary | grep delete | grep Sub
# Once we have the full path, this will give log on the file
git log --all -- src/groovy/.../../shared/serialize/Somefile.groovy
# Checkout file / or check with Source tree
git checkout <git-sha-here> src/groovy/.../../shared/serialize/Somefile.groovy
A set of python scripts to download the html page and generate json fragments for error codes.
Sources
Todo list:
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
interface ArtistValidator extends Function<Artist, Optional<Artist>>{ | |
static ArtistValidator hasMailWithAtSign(){ | |
return holds(artist -> artist.email.contains("@")); | |
} | |
static ArtistValidator nameIsNotEmpty(){ | |
return holds(artist -> artist.name.trim().length()>0); | |
} | |
static ArtistValidator holds(Function<Artist, Boolean> p){ | |
return artist -> p.apply(artist)?Optional.of(artist):Optional.empty(); | |
} |
To filter VPC Ids
aws ec2 describe-vpcs --filters Name=tag:Name,Values='dev vpc' Name=tag:ServiceName,Values=xyz --query Vpcs[].VpcId
To get public Ips for a given Vpc
aws ec2 describe-nat-gateways --filter Name=vpc-id,Values=vpc-1abc184a --query NatGateways[].NatGatewayAddresses[].PublicIp
We are going to use the Bittrex API to get market summary data
curl -X GET "https://bittrex.com/api/v1.1/public/getmarketsummaries" -o market_summaries.json
Each summary item looks like this
{
Download and run docker image with headless chrome
docker run -d -p 9222:9222 --cap-add=SYS_ADMIN justinribeiro/chrome-headless
That should start up chrome headless on docker-ip:9222
That uses Chrome Remote Dev protocol which is not what selenium implements so we’ll try to use Chromedriver
Unable to find a docker file with a combination of Chrome headless + Latest Chrome driver
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
AWSUSERNAME=<aws-user> | |
AWSPROFILE=<aws-profile> | |
# Get all the access keys currently used. We'll keep note of the one we are trying to rotate | |
aws iam list-access-keys --user-name $AWSUSERNAME | |
# Create a new access key | |
aws iam create-access-key --user-name $AWSUSERNAME | |
# Configure using aws-cli with the values generated from the above command |
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 com.intellij.database.model.DasTable | |
import com.intellij.database.model.ObjectKind | |
import com.intellij.database.util.Case | |
import com.intellij.database.util.DasUtil | |
/* | |
* Available context bindings: | |
* SELECTION Iterable<DasObject> | |
* PROJECT project | |
* FILES files helper |
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 | |
# Copied from http://www.oliversherouse.com/2015/08/21/boilerplate.html | |
"""A boilerplate script to be customized for data projects. | |
This script-level docstring will double as the description when the script is | |
called with the --help or -h option. | |
""" |
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 bash | |
# From: http://blog.slashdeploy.com/2016/03/05/bootstrapping-dns-on-aws/ | |
set -euo pipefail | |
declare stack_name="dns" | |
usage() { | |
echo "${0} COMMAND [options] [arguments]" |