Skip to content

Instantly share code, notes, and snippets.

View muhammadyana's full-sized avatar
🏠
Work From Anywhere

Muhammad Yana Mulyana muhammadyana

🏠
Work From Anywhere
View GitHub Profile
@muhammadyana
muhammadyana / Activate Office 2019 for macOS VoL.md
Created June 16, 2022 20:00 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref

@muhammadyana
muhammadyana / README.md
Created April 16, 2022 16:32 — forked from danirod/README.md
nginx + systemd + puma
@muhammadyana
muhammadyana / clean_code.md
Created February 22, 2022 03:16 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@muhammadyana
muhammadyana / rails http status codes
Created February 15, 2022 06:18 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@muhammadyana
muhammadyana / app.DockerFile
Created January 28, 2022 11:10 — forked from satendra02/app.DockerFile
docker+rails+puma+nginx+postgres (Production ready)
FROM ruby:2.3.1
# Install dependencies
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
# Set an environment variable where the Rails app is installed to inside of Docker image:
ENV RAILS_ROOT /var/www/app_name
RUN mkdir -p $RAILS_ROOT
# Set working directory, where the commands will be ran:
@muhammadyana
muhammadyana / message.md
Created November 23, 2020 14:02 — forked from skplunkerin/message.md
rails custom error message validation without column

Best solution:

http://stackoverflow.com/a/808776/1180523

# model
validates   :email,    :uniqueness => { message: "is wrong" }
validates   :name,    :uniqueness => { message: "Your name is wrong" }

HUMANIZED_ATTRIBUTES = {
  :email => "E-mail address",
  :name => "" # don't include column name in error
@muhammadyana
muhammadyana / .bash_profile
Created September 28, 2017 03:05 — forked from dirkraft/.bash_profile
.bash_profile (for Mac)includes sections for Bash, Homebrew, Ruby, Python, AWS
###############################################################################
# Globals-ish
export VISUAL=vim
export EDITOR=vim
export JAVA_HOME=`/usr/libexec/java_home`
###############################################################################
# Bash
@muhammadyana
muhammadyana / Gemfile
Created August 21, 2017 03:01 — forked from cblunt/Gemfile
Configure Carrierwave for Amazon S3 Storage and Heroku
# ...
gem 'carrierwave'
gem 'fog', '~> 1.0.0' # Need to specify version, as carrierwave references older (0.9.0) which doesn't allow configuration of Rackspace UK Auth URL
@muhammadyana
muhammadyana / index.html
Created June 7, 2017 04:40 — forked from hendra/index.html
Standard HTML Template
<!DOCTYPE html>
<html lang="en">
<head>
<title>Page title | website or product name</title>
<meta name="description" content="lorem ipsum dolor set amet" /> <!--Max 160 characters-->
<meta name="keywords" content="keyword1, keyword2, keyword3" />
<meta charset="utf-8" />
<!--Responsive using bootstrap-->
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
1. Do not repeat yourself (DRY). Meaning there shall no duplicate code
2. Tiny Controller Fat Model. Meaning all business logic shall be placed on Models NOT Controllers
3. Use framework plugins as much as possible for speedying up your software development
3.1 Ruby on Rails https://github.com/hothero/awesome-rails-gem
3.2 Laravel https://github.com/chiraggude/awesome-laravel
3.3 Django https://github.com/rosarior/awesome-django
3.4 Bootstrap https://bootstrapious.com/p/best-bootstrap-plugins
3.5 JQuery http://hasinhayder.github.io/essential-jquery-plugins/
3.6 VueJS https://github.com/vuejs/awesome-vue
3.7 React https://github.com/enaqx/awesome-react