Skip to content

Instantly share code, notes, and snippets.

@minhanhhere
minhanhhere / .bash_profile
Last active August 29, 2015 14:19
A .bash_profile for MAC
## INSTRUCTION
## Add these lines at the end of your ~/.bash_profile
## If the file is not there, create it with:
## touch ~/.bash_profile
PS1='\[\033[0;93m\]\u\[\033[0;97m\]@\[\033[0;96m\]\h\[\033[00m\]:\[\033[0;91m\]\w\[\033[00m\]\$ '
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias ll='ls -alF'
@minhanhhere
minhanhhere / gist:4fa7cf9962c120de898e
Created May 14, 2015 04:58
Chrome hidden html editor
Enter this code in URL bar, then Google Chrome will become an simple text editor.
We can even use Ctrl+B, Ctrl+I, Ctrl+U for formating
data:text/html,<html contenteditable>
@minhanhhere
minhanhhere / new_gist_file_0
Last active August 29, 2015 14:27
Android Log removal with Proguard
-assumenosideeffects class android.util.Log {
public static *** d(...);
public static *** e(...);
}
from
http://stackoverflow.com/questions/12390466/android-proguard-not-removing-all-log-messages
@minhanhhere
minhanhhere / IpRange.java
Last active September 18, 2015 06:37
Goodbye Google
import java.util.Arrays;
import java.util.List;
public class IpRange {
//region BlackListIpRanges
public static final List<IpRange> blacklistIpRanges = Arrays.asList(
new IpRange("104.132.0.0 - 104.135.255.255"),
new IpRange("104.154.0.0 - 104.155.255.255"),
new IpRange("104.196.0.0 - 104.199.255.255"),
@minhanhhere
minhanhhere / app.js
Last active December 17, 2015 16:59
Get IP Address Nodejs server
var express = require('express');
var app = express();
app.enable('trust proxy');
app.get('/', function (req, res) {
var ip = req.ip || req.connection.remoteAddress;
res.send('Hello World!' + ip + ' ' + req.connection.remoteAddress);
});
@minhanhhere
minhanhhere / inject.js
Last active January 27, 2016 08:05
Lazada lucky draw
/*
* http://www.lazada.vn/le-hoi-mua-sam-tet-nguyen-dan-vong-quay
* voucher sector: 3, 7, 9, 14
*/
var mar_timeout;
var mar_count = 0;
@minhanhhere
minhanhhere / ssh_common.sh
Created February 12, 2016 16:17
Common command with SSH
#ssh to a server
ssh user@host
#copy ssh key
ssh-copy-id user@123.45.56.78
@minhanhhere
minhanhhere / DeviceUuidFactory.java
Created February 21, 2016 18:00
Android Device Id
import android.content.Context;
import android.content.SharedPreferences;
import android.provider.Settings.Secure;
import android.telephony.TelephonyManager;
import java.io.UnsupportedEncodingException;
import java.util.UUID;
public class DeviceUuidFactory {
@minhanhhere
minhanhhere / event.json
Last active April 2, 2016 10:49
XHunt New Data Structure
/**
Lưu ý:
- PATH CŨNG CÓ ID (CLIENT GEN RA) CỦA RIÊNG NÓ
- format datetime sử dụng theo dạng 24h
- requireChallenge(default = "") là id của challenge cần phải làm xong (nếu ko có thì gán rỗng).
VD:
+ challengeId2 cần điều kiện là challengeId1 phải làm xong thì requqireChallenge = "challengeId1"
+ challenge nào ko cần điều kiện gì hết thì requqireChallenge = ""
- chỗ isActive: default gán là false
**/
@minhanhhere
minhanhhere / unity_ios_troubleshoot.md
Last active November 14, 2016 10:33
Unity Admob iOS Settings

#Build Settings:

- ENABLE_BITCODE : NO
- CLANG_ENABLE_MODULES: YES
- OTHER_LDFLAGS: -ObjC $(inherited)
- IPHONEOS_DEPLOYMENT_TARGET: 7.0

#Admob Mediation iOS: Download https://firebase.google.com/docs/admob/ios/download and copy Mediation Adapter to Plugins