Skip to content

Instantly share code, notes, and snippets.

View skrat's full-sized avatar

Dušan Maliarik skrat

View GitHub Profile
var jayson = require(__dirname + '/../..');
var wrap_jayson = function(client) {
return {
request: function(name, args) {
return new Promise(function(resolve, reject) {
client.request(name, args, function(err, error, response) {
if (err) return reject(err);
resolve(response);
})
diff --git a/dired.py b/dired.py
index 13517cd..6f5fb81 100644
--- a/dired.py
+++ b/dired.py
@@ -277,34 +277,36 @@ class DiredRefreshCommand(TextCommand, DiredBaseCommand):
self.view.sel().add(Region(pt, pt))
def vcs_check(self, edit, path, names, git='git'):
+ if not git:
+ git = 'git'
~/.themes/Numixol » s aura -Ax numix-circle-icon-theme-git ✓ skrat@apex
aura >>= Determining dependencies...
aura >>= AUR Packages:
numix-circle-icon-theme-git
numix-icon-theme-git
aura >>= Continue? [Y/n]
aura >>= Building `numix-icon-theme-git`...
==> Making package: numix-icon-theme-git 0.r39.51e148d-1 (Mon Apr 28 12:07:57 CEST 2014)
==> Checking runtime dependencies...
Apr 29 14:44:38 domU-12-31-39-0C-19-9B fleet[2977]: I0429 14:44:38.864789 02977 agent.go:197] Starting Job(tehblog.service)
Apr 29 14:44:38 domU-12-31-39-0C-19-9B fleet[2977]: I0429 14:44:38.865582 02977 manager.go:178] Writing systemd unit file tehblog.service
Apr 29 14:44:38 domU-12-31-39-0C-19-9B systemd[1]: Reloading.
Apr 29 14:44:38 domU-12-31-39-0C-19-9B fleet[2977]: I0429 14:44:38.866375 02977 manager.go:173] Instructing systemd to reload units
Apr 29 14:44:39 domU-12-31-39-0C-19-9B systemd[5667]: /usr/lib/systemd/system-generators/gentoo-local-generator failed with error code 1.
Apr 29 14:44:39 domU-12-31-39-0C-19-9B systemd[1]: Configuration file /run/systemd/generator/lvm2-activation-net.service is marked world-inaccessible. This has no effect as configuration data is accessible via APIs without restr
Apr 29 14:44:39 domU-12-31-39-0C-19-9B systemd[1]: Configuration file /run/systemd/generator/lvm2-activation-early.service is marked world-inaccessible. This has no effect as configuration data is acce
@skrat
skrat / gist:11402859
Last active August 29, 2015 14:00
tehblog.service
[Unit]
Description=Techblog - Wordpress LAMP
After=docker.service
Requires=docker.service
[Service]
ExecStart=/usr/bin/bash -c '/usr/bin/docker ps -a | grep tehblog > /dev/null && /usr/bin/docker rm -f tehblog > /dev/null; /usr/bin/docker run --name tehblog -d -p 8081:80 tutum/wordpress'
ExecStop=/usr/bin/bash -c '/usr/bin/docker stop tehblog; /usr/bin/docker rm -f tehblog'
@skrat
skrat / gist:fbd21fa75e9f05a9d0aa
Last active August 29, 2015 14:00
Promise queue
i = 0
queue = []
rs_command = (cmd) -> -> new Promise (resolve, reject) ->
post(uri: RSWS_URI, json: cmd)
.then (result) ->
errors = get_errors(result[0].body)
if errors.length
return reject(errors)
resolve(result[0].body)
#cloud-config
coreos:
etcd:
discovery: https://discovery.etcd.io/eeb0198338641f5c9b3c4f996bca8fc9
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
units:
- name: etcd.service
command: start
`/** @jsx React.DOM */`
# The above line HAS to be the first line in the file for JSX to know to process it.
MySimpleComponent = React.createClass
render: -> `<pre>{this.props.mytext}</pre>pre>`
MyComponent = React.createClass
render: ->
`(
<ul>
{this.props.items.map(
require 'eventmachine'
require 'amqp'
EventMachine.run {
conn = AMQP.connect(:host => '127.0.0.1')
puts "Connecting to RabbitMQ. Running #{AMQP::VERSION} version of the gem..."
ch = AMQP::Channel.new(conn)
q = ch.queue("amqpgem.examples.hello_world", :auto_delete => true)
x = ch.default_exchange
(defmacro joiner
[headers]
(let [extra [1 2 3]
joined (string/join "," (concat headers extra))]
`(some.one/doit ~joined)))
(defmacro joiner2
[headers]
(let [extra [1 2 3]]
`(some.one/doit (string/join "," (concat ~headers ~extra)))))