Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am thefourtheye on github.
  • I am thefourtheye (https://keybase.io/thefourtheye) on keybase.
  • I have a public key ASDZv6tKPo-qYEe9RD-BdM4S4YvlvxMPrsPUAgzyCmxLAwo

To claim this, I am signing this object:

@thefourtheye
thefourtheye / import.rb
Last active November 12, 2016 14:26 — forked from dnagir/import.rb
Import a blogger archive to jekyll (allows tags)
require 'rubygems'
require 'nokogiri'
require 'fileutils'
require 'date'
require 'uri'
# usage: ruby import.rb my-blog.xml
# my-blog.xml is a file from Settings -> Basic -> Export in blogger.
data = File.read ARGV[0]
I am using Apache Curator Recipes v2.10.0, with Scala 2.11.8. I want to be notified whenever there is a change (addition, deletion, and updation) in the Node I am watching. Following is the code I have,
curatorClient = CuratorFrameworkFactory.newClient("proper Connection String"),
new ExponentialBackoffRetry(1000, 3))
curatorClient.start()
treeCache = new TreeCache(curatorClient, "/a")
treeCache.start()
treeCache.getListenable.addListener(new TreeCacheListener {
var array = ['yshepu', 'mmxhhb', 'qwertz', 'wvlgrs', 'knfght'];
var prefix = 'myPrefix';
var Q = require('q');
function exists(prefix, name) {
var names = ['myPrefix:mmxhhb', 'myPrefix:knfght'];
return Q(names.indexOf(prefix + ':' + name) + 1);
}
function getActive(prefix, array) {
diff --git a/lib/install.js b/lib/install.js
index 32d9b10..066638d 100644
--- a/lib/install.js
+++ b/lib/install.js
@@ -102,6 +102,7 @@ var rimraf = require('rimraf')
var clone = require('lodash.clonedeep')
var iferr = require('iferr')
var validate = require('aproba')
+var mkdirp = require('mkdirp')
@thefourtheye
thefourtheye / gist:2205fe8ff7974e2cebf6
Created February 15, 2015 06:41
Python 3.5 - Django 1.7.4 Problem
Traceback (most recent call last):
File "/home/thefourtheye/Python/py3.5venv/bin/django-admin.py", line 5, in <module>
management.execute_from_command_line()
File "/home/thefourtheye/Python/py3.5venv/lib/python3.5/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/home/thefourtheye/Python/py3.5venv/lib/python3.5/site-packages/django/core/management/__init__.py", line 354, in execute
django.setup()
File "/home/thefourtheye/Python/py3.5venv/lib/python3.5/site-packages/django/__init__.py", line 18, in setup
from django.utils.log import configure_logging
File "/home/thefourtheye/Python/py3.5venv/lib/python3.5/site-packages/django/utils/log.py", line 13, in <module>
dpkg --get-selections | grep gnome
compiz-gnome install
firefox-gnome-support install
gir1.2-gnomebluetooth-1.0 install
gir1.2-gnomedesktop-3.0 install
gir1.2-gnomekeyring-1.0 install
gnome install
gnome-accessibility-themes install
gnome-applets install
gnome-applets-data install