Skip to content

Instantly share code, notes, and snippets.

View ntamvl's full-sized avatar
🏠
Working from home

Tam Nguyen ntamvl

🏠
Working from home
View GitHub Profile
@ntamvl
ntamvl / index.html
Last active February 21, 2024 11:19 — forked from davidwkeith/index.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>App Redirection</title>
</head>
<body>
<!-- iframe used for attempting to load a custom protocol -->
<iframe style="display:none" height="0" width="0" id="loader"></iframe>

All binary can be downloaded http://pan.baidu.com/s/1hqH2Pko

VERSION PLATFORM OFFSET ORIGINAL CRACKED
3083 Linux x64 0xcbe3 85 39
3083 Linux x86 0xc6f2 85 39
3083 Win x64 0xe21b3 85 3B
3083 Win x86 0x9eb1a 1a 2a
3083 OSX 0x69cf 85 39

All binary can be downloaded http://pan.baidu.com/s/1hqH2Pko

VERSION PLATFORM OFFSET ORIGINAL CRACKED
3083 Linux x64 0xcbe3 85 39
3083 Linux x86 0xc6f2 85 39
3083 Win x64 0xe21b3 85 3B
3083 Win x86 0x9eb1a 1a 2a
3083 OSX 0x69cf 85 39

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
<?php
/**
* Replace the default "_" (underscore) with "-" (hyphen) in protected custom fields for debugging purposes
*
* @param bool $protected The default value
* @param string $meta_key The meta key
* @return bool True for meta keys starting with "-" (hyphen), false otherwise
*/
function unprotected_meta( $protected, $meta_key ) {
@ntamvl
ntamvl / phantomjs.md
Created October 3, 2015 04:34 — forked from dominicsayers/phantomjs.md
Installing PhantomJS on Ubuntu

(updated version of http://www.joyceleong.com/log/installing-phantomjs-on-ubuntu/)

  1. export P=phantomjs-1.9.8-linux-x86_64
  2. cd /usr/local/share
  3. sudo wget https://bitbucket.org/ariya/phantomjs/downloads/$P.tar.bz2
  4. sudo tar xvf $P.tar.bz2
  5. sudo ln -s /usr/local/share/$P /usr/local/share/phantomjs
  6. sudo ln -s /usr/local/share/phantomjs/bin/phantomjs /usr/local/bin/phantomjs
  7. phantomjs --version
@ntamvl
ntamvl / 00.howto_install_phantomjs.md
Created October 3, 2015 04:34 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@ntamvl
ntamvl / LoopBack Replication & Offline sync.md
Last active February 21, 2024 11:18 — forked from bajtos/text.md
LoopBack Replication & Offline sync

The offline data access & synchronization is built from three components:

  1. Change tracking
  2. Replication of changes
  3. Browser version of LoopBack

Setup

Enable change tracking

@ntamvl
ntamvl / FileController.js
Created October 9, 2015 04:46 — forked from tkh44/FileController.js
Simple file upload for sails.js
module.exports = {
get: function (req, res) {
res.sendfile(req.path.substr(1));
},
_config: {
rest: false,
shortcuts: false
}
};
@ntamvl
ntamvl / restaurants.js
Created October 13, 2015 05:16 — forked from soltrinox/restaurants.js
Loopback : Model access non-related model via App object
'use strict';
var app = require('../../server/server');
module.exports = function(Restaurant, app) {
// Restaurant.validatesUniquenessOf('UUID', {message: 'UUID EXISTS'});
Restaurant.observe('before save', function setDefaultUsername(ctx, next) {
if (ctx.instance) {
if(!ctx.instance.created){
ctx.instance.created = Date.now();