Skip to content

Instantly share code, notes, and snippets.

View alfanzain's full-sized avatar
🏠
Working from home

Alfan Zain Putra alfanzain

🏠
Working from home
View GitHub Profile
@ikhsanalatsary
ikhsanalatsary / setup_cmder_wsl.md
Last active May 20, 2024 16:30
Setup cmder with WSL 2

Using WSL 2

  1. Open cmder
  2. On the menu, open Settings option and then select Startup > Tasks from the menu tree (or just hit Win + Alt + T)
  3. Click the “+” button to add a new task and fill in the fields as follow:
  4. Name: {zsh::home}
  5. Task Parameters:
    /icon "%CMDER_ROOT%\icons\cmder.ico"
    
@addeeandra
addeeandra / AnyAdapter.kt
Last active November 12, 2022 16:37
Android - Kotlin Easy Adapter
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
abstract class AnyAdapter<T>(val items: MutableList<T>) : RecyclerView.Adapter<AnyViewHolder<T>>() {
abstract fun getLayoutId(): Int
abstract fun onCreateViewHolder(view: View): AnyViewHolder<T>
@ahmadshobirin
ahmadshobirin / set locale and timezone indonesia in laravel.md
Last active June 28, 2024 11:49
set locale and timezone indonesia in laravel

Open File App\Providers\AppServiceProvider

Change method boot

use Carbon\Carbon;


public function boot()
{
	config(['app.locale' =&gt; 'id']);
@ywwwtseng
ywwwtseng / host-react-app-on-apache-server.md
Last active July 4, 2024 19:28
Host react application on Apache server

Host react application on Apache server

Step 1 : Create your app

$ npm install -g create-react-app 
$ create-react-app my-app

Step 2 : Build it for production

@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active July 2, 2024 00:02
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName