Skip to content

Instantly share code, notes, and snippets.

View xinuc's full-sized avatar
💭
I may be slow to respond.

Nugroho Herucahyono xinuc

💭
I may be slow to respond.
View GitHub Profile
@xinuc
xinuc / rb
Created May 24, 2017 14:53
prepend.rb
class Hello
def say
puts "hello"
end
end
Hello.new.say
# hello
module HelloPatch
#! /usr/bin/env ruby
str = `passenger-memory-stats | grep "Passenger RubyApp" | grep MB | grep -v 'grep'`
rows = str.split(/\n/)
rows = rows.map {|s| s.gsub(/\s+/, ' ').gsub(/MB Passenger.*/, '').gsub(/ .* MB/, '')}
rows = rows.select{|row| pid, mem = row.split(' '); mem.to_f > 1000 }.map{|row| row.split(' ').first}
rows.each{|pid| puts "kill #{pid}"; `kill #{pid}` }
59bcc3ad6775562f845953cf01624225
@xinuc
xinuc / proxy.sh
Created February 1, 2016 10:14
proxy
#!/bin/sh -e
if [ $# != 3 ]
then
echo "usage: $0 <src-port> <dst-host> <dst-port>"
exit 0
fi
while true; do
TMP=`mktemp -d`
@xinuc
xinuc / mongo.js
Created October 19, 2015 12:31
kill mongodb operation
db.currentOp().inprog.forEach(
function(op) {
if(op.secs_running > 5) printjson(op);
}
)
db.currentOp().inprog.forEach(
function(op) {
if(op.secs_running > 5) db.killOp(op["opid"]);
}
@xinuc
xinuc / pushpin.sh
Last active October 6, 2015 08:17
Pushpin install
sudo apt-get install pkg-config libqt4-dev libqca2-dev \
libqca2-plugin-ossl libqjson-dev libzmq3-dev python-zmq \
python-setproctitle python-jinja2 python-tnetstring \
python-blist mongrel2-core zurl
git clone git://github.com/fanout/pushpin.git
cd pushpin
git submodule init && git submodule update
make
@xinuc
xinuc / proxy.go
Last active August 29, 2015 14:18 — forked from vmihailenco/proxy.go
package main
import (
"flag"
"io"
"log"
"net"
"os"
"os/signal"
"runtime/pprof"
@xinuc
xinuc / indexable.rb
Created January 28, 2014 16:06
indexable
require 'active_support/concern'
module Concerns
module Indexable
class ResultList
include Enumerable
attr_accessor :results
attr_accessor :total
attr_accessor :from
@xinuc
xinuc / potato.rb
Created May 24, 2013 04:48
Potato
class Fixnum
def +(x)
"potato"
end
def *(x)
"potato"
end
def /(x)

Hadith

Formerly the stature of hadith was exalted. The throngs of hadith students were massive and the capabilities of the experts in the discipline and the transmitters of hadith were high.

Through their living the different sciences of hadith were made vital, through their continued existence the branches of various sub-disciplines of hadith were kept fresh and the abodes of hadith were occupied by its students. These students and experts have now died off and the sciences of hadith have been obliterated to such an extent that the practitioners in hadith are only a tiny band, few and weak in number.

For the most part, in taking up hadith they are concerned with nothing more than hearing them heedlessly, and in recording hadith they do not expend more effort than to write them down defectively. They toss aside the various sciences of hadith through which the strature of hadith became exalted and they have made themselves remote from the bodies of knowledge which made it magnificent. Just when someone exa