Skip to content

Instantly share code, notes, and snippets.

Avatar

Mufid mufid

View GitHub Profile
@mufid
mufid / NginxPhp2004.md
Last active Oct 31, 2020
Nginx PHP Migration/Installation 20.04
View NginxPhp2004.md

Memindahkan Pemasangan Wordpress (Ubuntu 20.04)

Cara-cara:

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

Menyiapkan Mesin Baru

View NginxPHP2004.md

Memindahkan Pemasangan Wordpress (Ubuntu 20.04)

Cara-cara:

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

Menyiapkan Mesin Baru

View droplet.md

All sizes:

512mb
s-1vcpu-1gb
1gb
s-1vcpu-2gb
s-1vcpu-3gb
s-2vcpu-2gb
s-3vcpu-1gb
2gb
@mufid
mufid / NginxPHP1804.md
Last active Oct 24, 2020
NginxPhp1804.md
View NginxPHP1804.md

Memindahkan Pemasangan Wordpress (Ubuntu 18.04)

Cara-cara:

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

Menyiapkan Mesin Baru

View MovingOut.md

Memindahkan Pemasangan Wordpress (Ubuntu 16.04)

Cara-cara:

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

Menyiapkan Mesin Baru

View ReadAllLines.java
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
["YARVInstructionSequence/SimpleDataFormat",
2,
3,
1,
{:arg_size=>0, :local_size=>0, :stack_max=>3},
"<compiled>",
"<compiled>",
@mufid
mufid / pg.rb
Created Feb 15, 2017
Rails Nested Query
View pg.rb
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', '>= 5.0.1'
@mufid
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
end
def to_mb
self / 1024 / 1024