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
| bindsym $mod+Return exec lxterminal | |
| bindsym $mod+t exec lxterminal | |
| bindsym $mod+g exec google-chrome | |
| bindsym $mod+s exec stx | |
| bindsym $mod+d exec dmenu_run | |
| bindsym $mod+l exec i3lock -c 111111 | |
| bindsym $mod+k kill | |
| bindsym $mod+m move scratchpad | |
| bindsym $mod+o scratchpad show | |
| bindsym $mod+Left focus left |
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 api | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "github.com/gin-gonic/gin" | |
| ) | |
| func Sdocker(c *gin.Context, image string, cmd ...string) { |
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
| version: '2' | |
| services: | |
| logspout: | |
| image: gliderlabs/logspout | |
| container_name: logspout | |
| volumes: | |
| - /var/run/docker.sock:/var/run/docker.sock | |
| environment: | |
| - SYSLOG_STRUCTURED_DATA=- X-OVH-TOKEN="<set-your-token-here>" | |
| ports: |
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 | |
| import ( | |
| "net/http" | |
| "sync" | |
| "github.com/gin-gonic/gin" | |
| ) | |
| func main() { |
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 -eu | |
| # | |
| # Call Docker Remote API for all machines in docker-machine. | |
| # | |
| get() { | |
| local node=$1 | |
| local path=$2 | |
| declare ip=$(docker-machine ip $node) |
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 | |
| import ( | |
| "flag" | |
| "net/smtp" | |
| "github.com/Sirupsen/logrus" | |
| ) | |
| var ( |
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
| var tokenId = '?'; | |
| var tokenKey = '?'; | |
| var metricName = '?'; | |
| var start = '?'; | |
| $.ajax({ | |
| url: 'https://opentsdb.iot.runabove.io/api/query', | |
| type: 'POST', | |
| data: JSON.stringify({ | |
| start: start, |
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 -eu | |
| # [key] [fields] [timestamp] | |
| # temperature,machine=unit143,type=assembly internal=22,external=130 1434055562005000035 | |
| split() { tr "$2" "\n" <<< $1; } | |
| get() { cut -d '=' -f$2 <<< $1; } | |
| point() { | |
| local timestamp=$1 |
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
| function microAjax(B,A){this.bindFunction=function(E,D){return function(){return E.apply(D,[D])}};this.stateChange=function(D){if(this.request.readyState==4){this.callbackFunction(this.request.responseText)}};this.getRequest=function(){if(window.ActiveXObject){return new ActiveXObject("Microsoft.XMLHTTP")}else{if(window.XMLHttpRequest){return new XMLHttpRequest()}}return false};this.postBody=(arguments[2]||"");this.callbackFunction=A;this.url=B;this.request=this.getRequest();if(this.request){var C=this.request;C.onreadystatechange=this.bindFunction(this.stateChange,this);if(this.postBody!==""){C.open("POST",B,true);C.setRequestHeader("X-Requested-With","XMLHttpRequest");C.setRequestHeader("Content-type","application/x-www-form-urlencoded");C.setRequestHeader("Connection","close")}else{C.open("GET",B,true)}C.send(this.postBody)}}; | |
| var url = window.location.href.split("/"); | |
| function get(path, el, template) { | |
| microAjax(url[0] + "//" + url[2] + path, function(data) { | |
| var ractive = new Ractive({el: el, templ |
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 | |
| set -eu | |
| MANDRILL_KEY="****************" | |
| FROM=pi@pi.pi | |
| TO=your@ema.il | |
| mail() { | |
| local ip="$1" |