Skip to content

Instantly share code, notes, and snippets.

View berkedel's full-sized avatar

Akhmad Syaikhul Hadi berkedel

View GitHub Profile
@berkedel
berkedel / MainApplication.java
Created August 18, 2019 03:45 — forked from axemclion/MainApplication.java
Adding Flipper to ReactNative
// 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 July 10, 2019 01:00
Instance Variables and Function Pointers

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 June 26, 2019 08:53
Firefox Software Update can’t be opened because it is from an unidentified developer

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 March 12, 2019 06:41 — 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

Remove script for Gmail

function Intialize() {
  return;
}

function Install() {
  ScriptApp.newTrigger("purgeGmail")
 .timeBased().everyMinutes(10).create();
@berkedel
berkedel / AdbCommands
Created February 25, 2019 10:26 — forked from Pulimet/AdbCommands
Adb useful commands list
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
@berkedel
berkedel / psql_useful_stat_queries.sql
Created December 12, 2018 14:06 — forked from anvk/psql_useful_stat_queries.sql
List of some useful Stat Queries for PSQL
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB.
------------
-- Basics --
------------
-- Get indexes of tables
@berkedel
berkedel / CustomAuthorizer.java
Created August 6, 2018 14:46 — forked from akeemphilbert/CustomAuthorizer.java
Example of using a Custom Authorizer with Couchbase Lite in Java
package com.domain.example
import com.couchbase.lite.Database;
import com.couchbase.lite.auth.Authorizer;
import com.couchbase.lite.util.Log;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

Keybase proof

I hereby claim:

  • I am berkedel on github.
  • I am berkedel (https://keybase.io/berkedel) on keybase.
  • I have a public key ASDbVr8OGC4mkLgtP4B7-mBOeG8A-V3T-tuDTpzbzE2ZSgo

To claim this, I am signing this object:

@berkedel
berkedel / error-report.js
Created May 31, 2018 09:28 — forked from tianjianchn/error-report.js
Error report util with fabric/crashlytics in react-native
/*global __DEV__*/
import StackTrace from 'stacktrace-js';
const Fabric = require('react-native-fabric');
const { Crashlytics } = Fabric;
//call this to start capturing any no-handled errors
exports.init = function(captrueOnDebugMode){
if (__DEV__ && !captrueOnDebugMode) {
return;