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
<?xml version="1.0" encoding="UTF-8"?> | |
<scheme name="Matula" version="124" parent_scheme="Default"> | |
<option name="LINE_SPACING" value="1.0" /> | |
<option name="EDITOR_FONT_SIZE" value="14" /> | |
<option name="EDITOR_FONT_NAME" value="Source Code Pro" /> | |
<colors> | |
<option name="ADDED_LINES_COLOR" value="295622" /> | |
<option name="ANNOTATIONS_COLOR" value="8b999f" /> | |
<option name="CARET_COLOR" value="bbbbbb" /> | |
<option name="CARET_ROW_COLOR" value="323232" /> |
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
Doesn't seem to work anymore | |
$("a").filter(function(index){return $(this).text()==="unsave"}).click(); | |
New | |
document.querySelectorAll("a").forEach(function(index,other){if(index.text==="unsave"){index.click();}}); |
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
source ~/.git_complete.sh | |
#Bash stuff | |
export PATH=$PATH:~/bin | |
export CLICOLOR=1 | |
export LSCOLORS=GxFxCxDxBxegedabagaced | |
export PS1="[\d \t :\w ] $ " | |
alias ll="ls -l" |
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 | |
find . -type d -maxdepth 1 \( ! -name . \) -exec bash -c "echo {}; cd {} && git $1" \; |
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 bash | |
kubectl get nodes -o=json | jq -c -r '.items | map(select(.spec | has("taints"))) | map(select(.spec.taints[].value == "master")) | map(select(.spec.taints[].key == "node.alpha.kubernetes.io/role")) | .[]' | while read object; do | |
NODE_NAME=$(echo "$object" | jq -r .metadata.name) | |
INSTANCE_ID=$(echo "$object" | jq -r .spec.externalID) | |
echo "rebooting node=$NODE_NAME instance-id=$INSTANCE_ID" | |
kubectl drain ${NODE_NAME} --ignore-daemonsets --force |
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 bash | |
aws ec2 describe-instances --filter "Name=tag-key,Values=kube-aws:role" "Name=tag-value,Values=etcd" | jq -r '.Reservations[].Instances[].InstanceId' | while read object; do | |
echo "rebooting $object" | |
aws ec2 reboot-instances --instance-ids ${object} | |
sleep 300 | |
done |
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
curl -s https://circleci.com/api/v1.1/project/github/user/repo?circle-token=<token> | jq '[.[] | select(.status=="success" or .status=="fixed")] | max_by(.build_num).build_num' |
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
aws ec2 describe-security-groups | jq -r '.SecurityGroups[] | select(.Description | contains("ingress")) | .GroupId' |xargs -I % aws ec2 delete-security-group --group-id % |
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 bash | |
kubectl get po -l app=$1 -o=json | jq -r '.items[].metadata.name' | while read object; do | |
kubectl delete po "$object" | |
sleep 180 | |
done |
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 java.util.Arrays; | |
public class LCS { | |
public static void main(String[] args) { | |
String str1 = "FAGGTAB"; | |
String str2 = "FGXTXAYB"; | |
int[][] matrix = buildMatrix(str1, str2); |
OlderNewer