- Firefox programmatically focus contenteditable https://jsfiddle.net/c933yzwu/
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/python | |
import subprocess | |
import os | |
import re | |
import sys | |
import time | |
import datetime | |
def log_info(msg): |
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/python | |
import subprocess | |
import os | |
import re | |
import sys | |
import itertools | |
sprint_regex = '^sprint\-(\d+)?$' | |
semver_regex = '^v(\d+)\.(\d+)\.(\d+)(\-(.*))?$' |
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 | |
git diff master..HEAD --numstat | grep 'src/' | awk '{a+=$1; d+=$2} END {print a, d}' |
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
convert favicon.png -bordercolor white -border 0 \ | |
\( -clone 0 -resize 16x16 \) \ | |
\( -clone 0 -resize 32x32 \) \ | |
\( -clone 0 -resize 48x48 \) \ | |
\( -clone 0 -resize 57x57 \) \ | |
\( -clone 0 -resize 64x64 \) \ | |
\( -clone 0 -resize 72x72 \) \ | |
\( -clone 0 -resize 110x110 \) \ | |
\( -clone 0 -resize 114x114 \) \ | |
\( -clone 0 -resize 120x120 \) \ |
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
package io.airfocus.common.logging | |
import com.fasterxml.jackson.core.JsonGenerator | |
import net.logstash.logback.argument.StructuredArgument | |
import net.logstash.logback.marker.LogstashMarker | |
import spray.json._ | |
case class JsonAppendingMarker(members: (String, JsValue)*) extends LogstashMarker("JSON_MARKER") with StructuredArgument { | |
override def writeTo(generator: JsonGenerator): Unit = { | |
def recursion(current: JsValue): Unit = current match { |
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
/* eslint-env node */ | |
'use strict' | |
const Bluebird = require('bluebird') | |
const childProcess = require('child_process') | |
function gitCommand (args) { | |
return new Promise((resolve, reject) => { | |
childProcess.execFile('git', args, (err, stdout, stderr) => { | |
if (!err) { |
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 javax.net.ssl.SSLSocket; | |
import javax.net.ssl.SSLSocketFactory; | |
import java.io.*; | |
/** Establish a SSL connection to a host and port, writes a byte and | |
* prints the response. See | |
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services | |
*/ | |
public class SSLPoke { | |
public static void main(String[] args) { |
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
package demo | |
import spray.json._ | |
import scala.language.implicitConversions | |
class RootJsonFormatWithDefault[T](inner: RootJsonFormat[T]) { | |
def withDefault[V](key: String, defaultValue: => V)(implicit writer: JsonWriter[V]): RootJsonFormat[T] = new RootJsonFormat[T] { | |
override def read(json: JsValue) = { | |
if (json.asJsObject.fields.contains(key)) inner.read(json) |
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 akka.actor.ActorSystem | |
import akka.cluster.seed.ZookeeperClusterSeed | |
trait MyAkkaSeedComponent { | |
def actorSystem: ActorSystem | |
val extension = ZookeeperClusterSeed(actorSystem) | |
extension.join() | |
} |