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 | |
for i in replicationController pod services route imagerepository buildconfig deploymentconfig service;do | |
for j in $(osc get $i|awk '{print $1}'|egrep -v '(POD|NAME|CONTROLLER)');do | |
osc delete $i $j | |
done | |
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
id: hello-openshift | |
kind: Pod | |
apiVersion: v1beta2 | |
labels: | |
name: hello-openshift | |
desiredState: | |
manifest: | |
version: v1beta1 | |
id: hello-openshift |
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/python | |
import json | |
import sys | |
import yaml | |
ydict = yaml.load(sys.stdin.read()) | |
print(json.dumps(ydict)) |
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
function mystock () { | |
local totalstock=NUMBEROFSTOCKYOUHAVE | |
local companystock=STOCKQUOTE | |
local yahoobase=http://download.finance.yahoo.com/d/quotes.csv?s | |
local yahooconv="${yahoobase}=USDEUR=X&f=l1" | |
local stockprice=$(curl -s "${yahoobase}=${companystock}&f=l1"|tr -d '^M') | |
local total=$[ $stockprice * $totalstock ] | |
local divided=$[ total / 4 ] | |
local eur=$(curl -s $yahooconv) |
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
for i in $(find . -name '*.json');do python -c 'import sys,json,yaml;print(yaml.safe_dump(json.loads(sys.stdin.read()), default_flow_style=False))' < $i > ${i/json/yaml};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
#!/usr/bin/env bash | |
LWN_USERNAME=USERNAME | |
LWN_PASSWORD='PASSWORD' | |
LWN_LOGIN_PAGE=http://lwn.net/login | |
LWN_PDF=/tmp/LWN-`date +%d-%m-%Y`.pdf | |
CURL_AGENT="login to lwn" | |
CURL_COOKIEJAR=/tmp/.lwncookies |
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 | |
# Install gdrive: https://github.com/prasmussen/gdrive (in /usr/local/bin here) | |
# do a drive list and get a folder where you will upload the screenshot | |
gdrive_container="0B7bJ57bKfWfBY1RsMVF5OVA3TEk" | |
filename=$(date "+%F__%H-%M-%S-$RANDOM.png") | |
save_to="/tmp/$filename" | |
screencapture -i "$save_to" |
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
--- | |
kind: "Template" | |
apiVersion: "v1" | |
metadata: | |
name: "quickstart-keyvalue-application" | |
annotations: | |
description: "This is an example of a Ruby and MySQL application on OpenShift 3" | |
iconClass: "icon-ruby" | |
tags: "instant-app,ruby,mysql" | |
labels: |
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
# -*- coding: utf-8 -*- | |
# Calcule des workout + times pour un groupe de differente VMA | |
# Les vma par default vons de 13 a 20 (a configurer dans la variable VMA) | |
# La variable WORKOUT est la variable des travaux a faire, | |
# c'est une array avec comme valeur : | |
# [times, percentage, distance, repos] | |
# times sont le nombre de repetition | |
# percentage sont le percentate a laquelle vous avez la VMA | |
# repos et le temp de repo pour cette repetition |
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
function oca () { | |
if [[ $1 == "sync" ]];then | |
mkdir -p ~/.kube/ | |
scp master:/etc/origin/master/admin.kubeconfig ~/.kube/ | |
fi | |
oc --config=$HOME/.kube/admin.kubeconfig $@ | |
} | |
compdef _oc oca | |