Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / auto_coins.js
Last active January 20, 2017 13:58
hacklike.vn auto
var url = '';
if (location.href.indexOf('p=fb_subscribe') > 0) {
url = 'http://hacklike.vn/phan-loai-cnang/modules/fb_subscribe/process.php';
}
if (location.href.indexOf('p=facebook') > 0) {
url = 'http://hacklike.vn/phan-loai-cnang/modules/facebook/process.php';
}
@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 / 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
public class PinAlgorithm {
public static void main (String[] args) throws java.lang.Exception
{
String bssid = "48:F8:B3:97:7A:A8";
int[] allPins = calculePin(bssid);
for (int pin : allPins) {
System.out.println(String.format("%d", pin));
}
}
@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 / proguard-android.ini
Last active November 30, 2016 06:28
Global Android Proguard
# Global
-verbose
-dontpreverify
-repackageclasses
-allowaccessmodification
-optimizations !code/simplification/arithmetic, !field/*, !class/merging/*
-optimizationpasses 5
## -dontobfuscate