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
tyrell:~▻ cat Library/Local/bin/ber1docker | |
#!/bin/bash | |
DOCKER_REMOTE_HOST="ber1.local" | |
DOCKER_SOCK="$TMPDIR/docker.sock" | |
export DOCKER_HOST="unix://$DOCKER_SOCK" | |
rm $DOCKER_SOCK | |
socat UNIX-LISTEN:$DOCKER_SOCK,reuseaddr,fork \ | |
EXEC:"ssh root@$DOCKER_REMOTE_HOST 'socat STDIO UNIX-CONNECT:/var/run/docker.sock'" & |
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:14.04 | |
RUN apt-get update -y && \ | |
apt-get install -y curl postgresql postgresql-client && \ | |
rm -rf /var/lib/apt/lists/* | |
CMD 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
FROM gliderlabs/alpine:3.3 | |
ENTRYPOINT ["/bin/registrator"] | |
COPY . /go/src/github.com/gliderlabs/registrator | |
RUN apk-install -t build-deps build-base go git mercurial \ | |
&& cd /go/src/github.com/gliderlabs/registrator \ | |
&& export GOPATH=/go \ | |
&& go get \ | |
&& go build -ldflags "-X main.Version=$(cat VERSION)" -o /bin/registrator \ | |
&& rm -rf /go \ |
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
if (gradle.startParameter.continuous) { | |
run { | |
flattenClassloaders = true | |
} | |
} |
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 node:latest | |
MAINTAINER Kamil Karczmarczyk <[email protected]> | |
# Global install yarn package manager | |
RUN npm set progress=false && \ | |
npm install -g --progress=false yarn | |
WORKDIR /workspace |
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
(define-key dired-mode-map (kbd "<M-return>") 'shell-instead-dired) | |
(define-key dired-mode-map (kbd «K») 'dired-do-kill-lines) | |
(define-key dired-mode-map (kbd «k») 'dired-previous-line) | |
(define-key dired-mode-map (kbd «J») 'dired-goto-file) | |
(define-key dired-mode-map (kbd «j») 'dired-next-line) | |
(define-key dired-mode-map (kbd «M-p») 'ace-window) | |
(define-key dired-mode-map (kbd «M-q») 'ace-window) | |
(define-key dired-mode-map (kbd "/") 'helm-occur) | |
;; в любом режиме Alt+hjkl ведут себя как обычный vim |
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
CREATE OR REPLACE FUNCTION notify_trigger() RETURNS trigger AS $$ | |
DECLARE | |
channel_name varchar DEFAULT (TG_TABLE_NAME || '_changes'); | |
BEGIN | |
IF TG_OP = 'INSERT' THEN | |
PERFORM pg_notify(channel_name, '{"id": "' || NEW.id || '"}'); | |
RETURN NEW; | |
END IF; | |
IF TG_OP = 'DELETE' THEN | |
PERFORM pg_notify(channel_name, '{"id": "' || OLD.id || '"}'); |
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
// app/models/post.js | |
export default DS.Model.extend({ | |
body: DS.attr(), | |
comments: DS.hasMany(), | |
addComment(commentData) { | |
let store = Ember.getOwner(this).lookup('service:store'); | |
let comment = store.createRecord('comment', commentData); | |
this.get('comments').pushObject(comment); | |
return comment.save().then(() => { | |
return this.save(); |
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
import ( | |
"path/filepath" | |
"os" | |
"runtime" | |
"github.com/mitchellh/go-homedir" | |
) | |
var configDirName = "example" |
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
socat TCP-LISTEN:2375,reuseaddr,fork UNIX-CONNECT:/var/run/docker.sock & | |
export DOCKER_HOST=tcp://localhost:2375 | |
unset DOCKER_TLS_VERIFY |