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
def lambda_handler(event, context): | |
message = 'Hello, World!' | |
return { | |
'statusCode': 200, | |
'body': message | |
} | |
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 json, os, sys, zlib, bz2, lzma | |
from datetime import datetime | |
def timeit(func): | |
def wrapper(*args, **kwargs): | |
st = datetime.now() | |
compressed_data = func(*args, **kwargs) | |
print('Time take: {} milliseconds'.format((datetime.now() - st).microseconds / 1000)) | |
return compressed_data |
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 | |
USERNAME="jirausername" | |
PASSWORD="jirausername" | |
COMMIT_MESSAGE=$(git log -1 HEAD --format=%s) | |
TICKET=$(echo $COMMIT_MESSAGE | cut -d ":" -f 1) | |
TIMESPENT=$(echo $COMMIT_MESSAGE | cut -d ":" -f 2) | |
COMMENT=$(echo $COMMIT_MESSAGE | cut -d ":" -f 3) | |
response=$(curl -s -D- -X POST -H "Authorization: Basic $(echo -n $USERNAME:$PASSWORD | base64))" -H "Content-Type: application/json" -d '{"comment": "'"$COMMENT"'","timeSpent": "'"$TIMESPENT"'"}' https://ip/rest/api/2/issue/$TICKET/worklog) |
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
# kubectl get pods --namespace=kube-system | |
NAME READY STATUS RESTARTS AGE | |
kubernetes-dashboard-mdfjy 1/1 Running 0 1h | |
# kubectl describe po kubernetes-dashboard-mdfjy --namespace=kube-system | |
Name: kubernetes-dashboard-mdfjy | |
Namespace: kube-system | |
Node: 127.0.0.1/127.0.0.1 | |
Start Time: Thu, 23 Jun 2016 13:33:46 +0000 | |
Labels: app=kubernetes-dashboard |
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
230 apt-get install build-essential libssl-dev | |
231 arch="$(uname -m)" | |
232 release="$(uname -r)" | |
233 upstream="${release%%-*}" | |
234 local="${release#*-}" | |
235 echo $release | |
236 echo $local | |
237 echo $upstream | |
238 mkdir -p /usr/src | |
239 wget -O "/usr/src/linux-${upstream}.tar.xz" "https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-${upstream}.tar.xz" |