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 | |
TIMEOUT=$1 | |
LAST_USED_FILE=~/.docker_last_usage | |
docker ps -q > /dev/null 2> /dev/null | |
result=$? | |
if [[ $result -eq 0 && -z $(docker ps -q) && $(cat $LAST_USED_FILE 2> /dev/null) && $(expr $(date +%s) - $(cat $LAST_USED_FILE 2> /dev/null)) -gt $TIMEOUT ]]; then | |
osascript -e 'quit app "Docker"' |
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
version: '2' | |
services: | |
zk1: | |
image: 31z4/zookeeper | |
restart: always | |
environment: | |
ZOO_MY_ID: 1 | |
ZOO_SERVERS: server.1=zk1:2888:3888 server.2=zk2:2888:3888 server.3=zk3:2888:3888 | |
networks: | |
solr_cluster: |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>OAuth code</title> | |
</head> | |
<body> | |
<div> | |
<label for="code">Your authorization code is:</label> | |
<b><span id="code"></span></b> |
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
def run(args) { | |
def enrolment = args.entity | |
if (enrolment.status == EnrolmentStatus.SUCCESS && enrolment.confirmationStatus == ConfirmationStatus.NOT_SENT) { | |
def m = Email.create("Enrolment Confirmation") | |
m.bind(enrolment: enrolment) | |
m.to(enrolment.student.contact) | |
m.send() |
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
def run(args) { | |
def invoice = args.entity | |
if (invoice.confirmationStatus == ConfirmationStatus.NOT_SENT) { | |
def m = Email.create("Tax Invoice") | |
m.bind(invoice: invoice) | |
m.to(invoice.contact) | |
m.send() |
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
#include <stdio.h> | |
#include <unistd.h> | |
#include <crypt.h> | |
int main(int argc, char **argv) { | |
int option; | |
int debug = 0; | |
const char *salt; | |
const char *pass; |
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
/* | |
MIT License | |
Copyright (c) 2013 Dzmitry Kazimirchyk | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |