This file contains hidden or 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
| [Unit] | |
| Description=Announce Streuth Service | |
| BindsTo=example.1.service | |
| [Service] | |
| ExecStartPre=/usr/bin/etcdctl set /vulcand/hosts/example.local.net/locations/loc1/path "/.*" | |
| ExecStartPre=/usr/bin/etcdctl set /vulcand/hosts/example.local.net/locations/loc1/upstream example | |
| ExecStart=/bin/sh -c "while true; do etcdctl set /vulcand/upstreams/example/endpoints/ep1 'http://%H:5001' --ttl 60;sleep 45;done" | |
| ExecStop=/usr/bin/etcdctl rm /vulcand/upstreams/example/endpoints/ep1 | |
| Restart=always |
This file contains hidden or 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
| /* Taken from https://www.cybercom.net/~dcoffin/dcraw/dcraw.c */ | |
| /* Which itself attributes this algorithm to "Frank Markesteijn" */ | |
| #define TS 512 /* Tile Size */ | |
| #define fcol(row,col) xtrans[(row+6) % 6][(col+6) % 6] | |
| void CLASS xtrans_interpolate (int passes) | |
| { | |
| int c, d, f, g, h, i, v, ng, row, col, top, left, mrow, mcol; | |
| int val, ndir, pass, hm[8], avg[4], color[3][8]; |
This file contains hidden or 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
| /* Taken from https://www.cybercom.net/~dcoffin/dcraw/dcraw.c */ | |
| /* | |
| Adaptive Homogeneity-Directed interpolation is based on | |
| the work of Keigo Hirakawa, Thomas Parks, and Paul Lee. | |
| */ | |
| void CLASS ahd_interpolate() | |
| { | |
| int i, j, top, left, row, col, tr, tc, c, d, val, hm[2]; | |
| static const int dir[4] = { -1, 1, -TS, TS }; |
This file contains hidden or 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
| // ==UserScript== | |
| // @name OzIsuzu tamper | |
| // @namespace http://your.homepage/ | |
| // @version 0.1 | |
| // @description Tweaks to OzIsuzu forum pages | |
| // @author You | |
| // @match http://www.ozisuzu.com.au/* | |
| // @grant none | |
| // ==/UserScript== |
This file contains hidden or 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
| FROM ubuntu:trusty | |
| MAINTAINER tobyc@strategicdata.com.au | |
| ENV DEBIAN_FRONTEND noninteractive | |
| VOLUME /var/lib/riak | |
| EXPOSE 4369 8080 8087 8098 8099 | |
| COPY 99-http-proxy /etc/apt/apt.conf.d/ | |
| RUN apt-get update | |
| RUN apt-get upgrade -y | |
| RUN apt-get install -y curl | |
| RUN curl -s https://packagecloud.io/install/repositories/basho/riak/script.deb.sh | bash |
This file contains hidden or 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
| lazy val root = (project in file(".")). | |
| settings( | |
| name := "items", | |
| version := "0.1", | |
| scalaVersion := "2.11.7" | |
| ) | |
| libraryDependencies += "org.yaml" % "snakeyaml" % "1.16" | |
| javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint") |
This file contains hidden or 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
| lazy val root = (project in file(".")). | |
| settings( | |
| organization := "au.net.strategicdata", | |
| name := "riak-slow", | |
| version := "0.1", | |
| scalaVersion := "2.11.8" | |
| ) | |
| libraryDependencies += "com.basho.riak" % "riak-client" % "2.1.0" |
This file contains hidden or 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 | |
| echo "first file is ok" > first.txt | |
| echo "second file is ok" > second.txt | |
| echo "third file is ok" > third.txt | |
| docker-compose up -d | |
| echo "Waiting for docker compose for 10 seconds" | |
| echo "Note: this demo assumes you've configured mc to have an endpoint called local configured...." | |
| sleep 10 | |
| mc mb local/test | |
| mc cp first.txt local/test/ |
This file contains hidden or 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
| Download the files below into some directory. | |
| Edit setup_env.sh to point to a Minio server. | |
| source ./setup_env.sh | |
| sbt run |
This file contains hidden or 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 main | |
| // Embarrassingly quick and dirty Go program to reboot a TP-Link TD-8840 ADSL modem. | |
| // Will possibly work on other devices with slight modifications. | |
| import ( | |
| "github.com/ziutek/telnet" | |
| "log" | |
| "os" | |
| "time" |