Skip to content

Instantly share code, notes, and snippets.

View shulhi's full-sized avatar
🏃‍♂️

Shulhi Sapli shulhi

🏃‍♂️
View GitHub Profile
@shulhi
shulhi / hexo-theme-menu.md
Last active December 27, 2015 19:59
How to add menu to Hexo's DamnClean Theme
  1. Generate a page hexo new page 'about'

  2. In the theme's _config.yml You can add menu at the menu options like so

    menu:
      Home: /
      Archives: /archives
 About: /about
@shulhi
shulhi / syslog-ng.md
Created November 29, 2013 02:55
How to fix syslog-ng `afsql` module error

Simply

yum install syslog-ng-libdbi

@shulhi
shulhi / Solr.md
Created January 28, 2014 09:04
Create multifaceted query in Solr

Multifaceted query

facet.field=level&facet.field=facility&facet.field=host&facet.field=program

facet.query=zulutime:[NOW-1DAY TO NOW]

fq=zulutime:[NOW-1DAY TO NOW]

@shulhi
shulhi / install_scipy.md
Last active August 29, 2015 13:56
Installing `scipy` on Ubuntu 13 using pip

Easiest way

$ sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose

This will install scipy together with other packages on python that run on the system. If you're using pyenv, it won't work though because it couldn't find the packages.

Other way

@shulhi
shulhi / distributed-system.md
Last active December 10, 2017 20:57
Distributed System Reading List

Introduction

I often argue that the toughest thing about distributed systems is changing the way you think. The below is a collection of material I've found useful for motivating these changes.

Thought Provokers

Ramblings that make you think about the way you design. Not everything can be solved with big servers, databases and transactions.

@shulhi
shulhi / cloudera.md
Created April 25, 2014 08:56
Cloudera Troubleshoot

If Zookeeper cannot be started, check for DNS resolution.

$ hostname
$ hostname -f
$ python -c 'import socket; print socket.getfqdn(), socket.gethostbyname(socket.getfqdn())'
@shulhi
shulhi / algo.md
Last active August 29, 2015 14:01
Algorithm list

This document contains some notes I have gathered while I was trying to setup a redis service using boot2docker running on OS X. This won't cover what Docker is, see Docker website for details.

Installing boot2docker

First, install Virtualbox and follow the steps at http://docs.docker.com/installation/mac/

Since Docker only runs on Linux, boot2docker runs a virtual machine in Virtualbox (or VMWare etc), however you can run the docker command on OS X

import java.net.InetAddress;
import java.net.UnknownHostException;
public class dns {
public static void main(String[] args) throws UnknownHostException {
InetAddress addr = InetAddress.getLocalHost();
System.out.println(String.format(
"IP:%s hostname:%s canonicalName:%s",
addr.getHostAddress(),