Skip to content

Instantly share code, notes, and snippets.

View jokomanza's full-sized avatar
:octocat:
Focusing

Joko Supriyanto jokomanza

:octocat:
Focusing
View GitHub Profile
@handstandsam
handstandsam / MyLifecycleOwner.kt
Last active June 17, 2024 20:16
Jetpack Compose OverlayService. You have to have all the correct permissions granted and in your manifest, but if you do, this this will show a green box with "Hello" in it!
import android.os.Bundle
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleRegistry
import androidx.savedstate.SavedStateRegistry
import androidx.savedstate.SavedStateRegistryController
import androidx.savedstate.SavedStateRegistryOwner
internal class MyLifecycleOwner : SavedStateRegistryOwner {
private var mLifecycleRegistry: LifecycleRegistry = LifecycleRegistry(this)
private var mSavedStateRegistryController: SavedStateRegistryController = SavedStateRegistryController.create(this)
@naingyeminn
naingyeminn / ntfsmount
Last active October 6, 2022 16:02
NTFS-3G Mount Script for MacOS
#!/bin/bash
#---- ---- ---- ----
# Copyright (C) Naing Ye Minn <naingyeminn@gmail.com>
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#---- ---- ---- ----
# Install osxfuse and ntfs-3g via brew
# $ brew cask install osxfuse
# $ brew install ntfs-3g
# Installation
This procedure is tested on Mac OS X 10.14.6 with Developers tools installed (xCode).
PHP 5.6 installed with Homebrew.
## Preparation
Download the following files from [Oracle website](https://www.oracle.com/database/technologies/instant-client/macos-intel-x86-downloads.html) (yes, you need to create an account and accept terms):
* instantclient-sdk-macos.x64-19.3.0.0.0dbru.zip
@wojteklu
wojteklu / clean_code.md
Last active June 18, 2024 13:55
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

@dedy-purwanto
dedy-purwanto / 10fastfinger_bot.js
Created December 22, 2011 12:44
BOT for 10fastfingers, automatic typing with adjustable speed
/*
* BOT for 10fastfingers, automatic typing with adjustable speed
* ================================================================
*
* bored in my apartment and decided to hack this game: http://indonesian-speedtest.10fastfingers.com/
* just start the game, when you're ready to type, DON'T TYPE ANYTHING, open up
* your Developer Tools in Chrome (CTRL+SHIFT+J) and click Console tab, and
* then paste the whole code below, then press enter, and enjoy the show.
*
* twitter.com/kecebongsoft