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
javascript:document.querySelectorAll("span[class='story-card__label']").forEach(a => a.parentElement.remove());document.querySelector("#premium-toaster").remove(); |
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 pandas as pd | |
df = pd.read_csv("./dates.csv") | |
df_length = len(df.index) | |
print("# Incidents: ", df_length) | |
df['A'] = pd.to_datetime(df["start_date"]) | |
df['B'] = pd.to_datetime(df["end_date"]) | |
df['MTTR'] = (df['B'] - df['A']).astype('timedelta64[h]') | |
print("MTTR: ", df['MTTR'].mean()) |
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
x=20 | |
y=20 | |
clear; | |
for x in {0..150}; do | |
y=`echo "12+6*s($x/6)"|bc -l|cut -d. -f 1` | |
echo -en \\033[$y\;"$(($x/2))"HX; | |
sleep 0.1; | |
done |
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 | |
git checkout master | |
for branch_name in $(git branch --merged| egrep -v "(^\*|master|release|integrate)") | |
do | |
git tag archive/$branch_name $branch_name | |
git branch -d $branch_name | |
done |
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
<html> | |
<head> | |
<title>Flip</title> | |
<style> | |
.container { | |
position:relative; | |
width:400px; | |
height:400px; |
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
{ | |
"containerDefinitions": [ | |
{ | |
"name": "datacontainer", | |
"mountPoints": [ | |
{ | |
"sourceVolume": "volume-0", | |
"readOnly": false, | |
"containerPath": "/app/acmeinc-api/log/" | |
} |
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 | |
set -e | |
JQ="jq --raw-output --exit-status" | |
deploy_image() { | |
# get the authorization code and login to aws ecr | |
autorization_token=$(aws ecr get-authorization-token --registry-ids $account_id --output text --query authorizationData[].authorizationToken | base64 --decode | cut -d: -f2) | |
docker login -u AWS -p $autorization_token -e none https://$account_id.dkr.ecr.us-east-1.amazonaws.com |
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 | |
set -e | |
set -u | |
set -o pipefail | |
fix_name() { | |
DOCKERFILE_NAME="Dockerfile" | |
if [[ $CIRCLE_BRANCH = 'release' ]]; then | |
DOCKERFILE_NAME="$DOCKERFILE_NAME.prod"; | |
elif [[ $CIRCLE_BRANCH = 'test.1' ]]; then |
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
machine: | |
node: | |
version: | |
0.10.33 | |
services: | |
- docker | |
checkout: | |
post: | |
- chmod +x ./fix_dockerfile.sh && ./fix_dockerfile.sh |
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
# Dockerizing Mongodb with ubuntu as base # Based on ubuntu:latest | |
FROM ubuntu:latest | |
MAINTAINER Amir Mohtasebi <[email protected]> | |
# Installation based on http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/ | |
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 | |
RUN echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/10gen.list | |
# Installing mongodb-org |
NewerOlder