Skip to content

Instantly share code, notes, and snippets.

Mufid mufid

Block or report user

Report or block mufid

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mufid /
Last active Nov 30, 2019

Memindahkan Pemasangan Wordpress (Ubuntu 18.04)


  • Siapkan mesin baru
  • Backup data dari mesin lama
  • Restore data ke mesin baru
  • Done

Menyiapkan Mesin Baru


Memindahkan Pemasangan Wordpress (Ubuntu 16.04)


  • Siapkan mesin baru
  • Backup data dari mesin lama
  • Restore data ke mesin baru
  • Done

Menyiapkan Mesin Baru

class ReadFile {
void readFile(String fileName) {
Files.readAllLines(Paths.get(fileName), StandardCharsets.UTF_8);
View ShowText.cs
mainTextFrame.Text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum"
View yarv-array-ruby231.txt
[1] pry(main)> require 'pp'
=> false
[2] pry(main)> pp RubyVM::InstructionSequence.compile('["aku", "suka", "ini"]').to_a
{:arg_size=>0, :local_size=>0, :stack_max=>3},
mufid / pg.rb
Created Feb 15, 2017
Rails Nested Query
View pg.rb
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
gemfile(true) do
source ''
gem 'rails', '>= 5.0.1'
mufid / autoconv.rb
Created Mar 31, 2016
Convert all file in the directory to *.FLAC
View autoconv.rb
target = ARGV.last
puts "Will process: #{target}"
class Fixnum
def mb
self * 1024 * 1024
def to_mb
self / 1024 / 1024
mufid / g_rbt_asia_fetcher.rb
Created Jul 20, 2015
View g_rbt_asia_fetcher.rb
class GRbtAsia < Fetcher
PAGE_TEMPLATE = "{page}"
THREAD_TEMPLATE = "{thread}"
def fetch_page page_num
puts "Start fetch page #{page_num}"
html = RestClient.get(PAGE_TEMPLATE % {page: page_num})
doc = Nokogiri::HTML(html)
mufid / gist:c92b876d28437400597a
Created May 7, 2015
View gist:c92b876d28437400597a
#!/usr/bin/env ruby
require "rubygems"
require 'descriptive_statistics'
arr = []
ARGF.each_with_index do |line, idx|
# print ARGF.filename, ":", idx, ";", line
arr << line.to_i if line.to_i > 0

Having Fun with Java's Null

So lately i have been diving really deep (or not really) into Java. I found Java's null is interesting. I think, i hate NullPointerException very much. And most of the time, i hate my own way to deal with those things.

Btw, if you hate compiling Java's code just to test a one-line command, you may use [JavaRepl], which will give you an interactive mode of Java compiler.

String Concatenation

This is interesting. If you run

You can’t perform that action at this time.