Skip to content

Instantly share code, notes, and snippets.

View danistrebel's full-sized avatar

Daniel Strebel danistrebel

View GitHub Profile
@danistrebel
danistrebel / ParseJiraIssues.scala
Created June 24, 2015 07:02
Parses a Jira XML export and generates Json objects for POSTing them to the Github API
object ParseJiraIssues extends App {
val pathToXMLExport = args(0)
val issues = scala.xml.XML.loadFile(pathToXMLExport)
case class Issue(title: String, summary: String, description: String,
reporter: String, assignee: String,
created: String) {
def toJson = {
s"""{
@danistrebel
danistrebel / PrettyStringList.scala
Created October 13, 2015 13:07
Seq("a", "b", "c", "d") => "a, b, c or d"
def orJoin(list: Seq[String]) = {
(list.reverse match {
case last::secondToLast::rest => (s"$secondToLast or $last"::rest).reverse
case _ => list
}).mkString(", ")
}
@danistrebel
danistrebel / srf-podcasts.json
Created December 26, 2015 19:51
JSON representation of the Podcast data as listed on http://www.srf.ch/podcasts.
[
{
"title": "#SRFglobal",
"description": "Im Magazin zum aktuellen Weltgeschehen greift Florian Inhauser zusammen mit SRF-Korrespondenten einmal im Monat ein internationales Thema auf.",
"imageSrc": "http://s3.srfcdn.ch/images/auftritte/sendungsauftritte/srfglobal/teaser_fuer_sendungen_a_z/srfglobal/96017129-1-ger-DE/srfglobal_s2_retina.jpg",
"lqPodcastSrc": "http://feeds.sf.tv/podcast/srfglobal",
"hqPodcastSrc": "http://www.srf.ch/podcasts/feeds/video/srfglobal-hd.xml"
},
{
"title": "1 gegen 100",

Keybase proof

I hereby claim:

  • I am danistrebel on github.
  • I am danistrebel (https://keybase.io/danistrebel) on keybase.
  • I have a public key ASAapGLZm7kcgxIXSP-Pxrm9QvHgHDLWjUpVP7WPRRV5PAo

To claim this, I am signing this object:

kubectl get po -o=jsonpath="{range .items[*]}{.metadata.namespace}, {.metadata.name}{'\n'}{range .spec.containers[*]}{'\t'}{.name}, {.resources.requests.cpu}, {.resources.limits.cpu}, {.resources.requests.memory}, {.resources.limits.memory}{'\n'}{end}{'\n'}{end}"
@danistrebel
danistrebel / shortcuts.sh
Last active July 16, 2020 07:13
Lazy Typing Shortcuts
alias kc='kubectl'
alias gitlog="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"