Skip to content

Instantly share code, notes, and snippets.

View damiandragowski's full-sized avatar
💭
当被称赞时,即使是猪也可以爬树

Damian Drągowski damiandragowski

💭
当被称赞时,即使是猪也可以爬树
  • ovalinfo.com
  • Warsaw
View GitHub Profile
@damiandragowski
damiandragowski / gist:9ffb1adc53c5cf8c1ec0128b647c2518
Created October 24, 2019 10:11
healthcheck for web app with credential by curl, use for jenkins
bash -c 'while [[ "$(curl -o /dev/null -s -u jprabucki: -w ''%{http_code}'' http://localhost:8080/cp-css/start.html)" != "200" ]]; do echo ''server returned ''; curl -s -u jprabucki: -w ''%{http_code}'' http://localhost:8080/cp-css/start.html; sleep 2; done'
#include <stdio.h>
#include <sys/time.h>
#define NUMBER 30
int main (void) {
struct timeval tv[NUMBER];
int count[NUMBER], i, diff;
gettimeofday (&tv[0], NULL);
tracking age properteis, by passing list to it
var age : Int by Delegates.observable({
historyList.add(0)
0
}()) {
property, oldVal, newVal -> historyList.add(newVal)
}