Skip to content

Instantly share code, notes, and snippets.

Avatar

Akhmad Syaikhul Hadi berkedel

  • Depok
View GitHub Profile
View setup-tools-on-wsl-ubuntu.md

Setup Tools on WSL Ubuntu

This is a personal note to make a documentation when I use WSL Ubuntu 20.04 LTS on Windows 10.

Change hostname

Edit the default hostname by editing two files below. Replace all the old hostname with the new one.

$ sudo vi /etc/hostname
@berkedel
berkedel / fix-xcode-select-error-xcodebuild-requires-xcode.md
Last active Jan 14, 2020
Fix `xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance`
View fix-xcode-select-error-xcodebuild-requires-xcode.md

Tried to create react app

npx create-react-app app

Unfortunately, got an xcodebuild error

node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.17/fse-v1.0.17-node-v57-darwin-x64.tar.gz
@berkedel
berkedel / fix-sudoers-issue-on-macos-catalina.md
Created Jan 3, 2020
Fix `sudoers` issue on macOS Catalina
View fix-sudoers-issue-on-macos-catalina.md

Fix sudoers Issue on macOS Catalina

If you messed up with editing sudoers, this solution is for you. The solution is limited to restoring /etc/sudoers file to the original state. It is easier to mess up your config such as saving wrong format, etc.

How to Fix

  • Please reboot your macOS into recovery mode. While rebooting press and hold Cmd+R key.
  • After you completely reboot, you will see a dialog. You need to open Terminal by clicking Utilities > Terminal on menu.
  • In order to mount /etc as writable state, you need to disable SIP first by executing csrutil disable.
  • Reboot into single user mode. While rebooting press and hold Cmd+S key.
@berkedel
berkedel / MainApplication.java
Created Aug 18, 2019 — forked from axemclion/MainApplication.java
Adding Flipper to ReactNative
View MainApplication.java
// Call this in MainApplication.onCreate(), just after Soloader line.
private static void initialize(Context context) {
if (BuildConfig.DEBUG) {
try {
/*
We use reflection here to pick up the class that initializes Flipper,
since Flipper library is not available in release mode
*/
Class<?> aClass = Class.forName("com.facebook.flipper.ReactNativeFlipper");
aClass.getMethod("initializeFlipper", Context.class).invoke(null, context);
@berkedel
berkedel / Instance Variables and Function Pointers.md
Created Jul 10, 2019
Instance Variables and Function Pointers
View Instance Variables and Function Pointers.md

The Unity tool. I hate it. All it does is make people worse at hacking because no one is developing actual analysis skills anymore. Now all you have to do to make an awesome hack is to CTRL-F everything until you have 100 features. If you want to get good at something, take the hard route. I can't stress that enough. Anyway, when I first heard about it, I thought it just revealed method names and locations. I was surprised upon finding that not only does it reveal method names and their locations, it reveals class names, parameters, instance variables, and the location in memory where said instance variables can be found. I couldn't believe what was right in front of me because everyone was just taking advantage of visible methods and their locations.

This applies to non-Unity games as well. You just need to have knowledge of object oriented programming to really know how to take advantage of instance variables. I guess I could cover that in a later tutorial. Anyway, let's get started.

This tutorial pertain

@berkedel
berkedel / firefox-software-update-problem-in-macos-catalina-beta.md
Created Jun 26, 2019
Firefox Software Update can’t be opened because it is from an unidentified developer
View firefox-software-update-problem-in-macos-catalina-beta.md

In latest macOS Catalina beta, this issue will occur for firefox user when opening for the first time after upgrading.

The workaround:

  1. Disable the assessment subsystem altogether temporarily by running sudo spctl --master-disable on your terminal.
  2. Open Firefox and close it.
  3. Then enable again the assessment subsystem by running sudo spctl --master-enable.
  4. Then open Firefox, hope it will solve
@berkedel
berkedel / README.md
Created Mar 12, 2019 — forked from balupton/README.md
Remove script for Gmail that delets all email threads/messages that match search for when Gmail can't do it itself
View README.md

Remove script for Gmail

function Intialize() {
  return;
}

function Install() {
  ScriptApp.newTrigger("purgeGmail")
           .timeBased().everyMinutes(10).create();
@berkedel
berkedel / AdbCommands
Created Feb 25, 2019 — forked from Pulimet/AdbCommands
Adb useful commands list
View AdbCommands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
You can’t perform that action at this time.