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
TC_TOKEN=<Teamcity Token> | |
curl -X POST -H "Authorization: Bearer $TC_TOKEN" \ | |
--header "Content-Type:application/xml" \ | |
-d" | |
<build> | |
<buildType id=\"<TeamCity Build ID>\"/> | |
<properties> | |
<property name=\"<Parameter Name>\" value=\"<Parameter Value>\"/> | |
</properties> | |
</build> |
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
images=( | |
kube-apiserver:v1.17.4 | |
kube-controller-manager:v1.17.4 | |
kube-scheduler:v1.17.4 | |
kube-proxy:v1.17.4 | |
pause:3.1 | |
etcd:3.4.3-0 | |
coredns:1.6.5 | |
) |
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
// Refer to https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues | |
crypto.getRandomValues(new Uint8Array(5)).map(i => i%100) | |
// Uint8Array(5) [21, 54, 59, 41, 79] |
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 com.example | |
import java.util.* | |
import kotlinx.coroutines.* | |
import kotlin.system.measureTimeMillis | |
val title = "Kotlin Demo" | |
var content = "A 20-mins Kotlin sharing" | |
var optional: String? = null |
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
(ns hello-clojure.core | |
(:use [clojure.test])) | |
(require '[ | |
clojure.java.io :as io | |
] ) | |
(def path "./resources/test/hello.txt") | |
(defn read-file [path] |
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 Foundation | |
extension Int { | |
func format(f: String) -> String { | |
return String(format: "%\(f)d", self) | |
} | |
} | |
extension Double { | |
func format(f: String) -> String { |
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
let strDate = "2016-06-01T00:00:00Z" | |
let dateFormatter = NSDateFormatter() | |
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZ" | |
let date = dateFormatter.dateFromString(strDate) |
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
tableView.deselectRowAtIndexPath(indexPath, animated: true) |
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
@Override | |
protected void onResume() { | |
super.onResume(); | |
final Handler handler = new Handler(Looper.getMainLooper()) { | |
@Override | |
public void handleMessage(Message msg) { | |
EditText et = (EditText) findViewById(android.R.id.text1); | |
et.requestFocus(); | |
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); |
NewerOlder