Skip to content

Instantly share code, notes, and snippets.

View tvhung83's full-sized avatar

Hung V. Nguyen tvhung83

View GitHub Profile
exports.unpack = function (p){var c=p;var a=10,x=1;while(x<a){c=unescape(c);if(/eval\(+function\(/.test(c)){c=this.depack(c);x++}else{break}};c=unescape(c);c=R(c,{indent_size:1,indent_char:'\t'});return c}
exports.depack = depack = function (p){if(p!=""){c=unescape(p);var _e=eval,s="eval=function(v){c=v;};"+c+";eval=_e;";eval(s)}else{c=p};return c}
exports.R = R = reformat = function (a, b) {
var d, e, f, g, h, j, k, l, m;
var o, p, q, r, s, u, v;
var w, x, y, z, aa, ab;
var ac;
a = C(a);
b = b || {};
var ad = b.indent_size || 4;
@tvhung83
tvhung83 / generate.go
Last active December 6, 2018 08:26
Generate random data to CSV file
package main
import (
"os"
"strconv"
"github.com/gocarina/gocsv"
"github.com/bxcodec/faker"
)
const generate = require('csv-generate')
const fs = require('fs')
const minimist = require('minimist')
let args = minimist(process.argv.slice(2), {
alias: {
f: 'file',
c: 'columns',
l: 'length'
}
})
-- Mike Solomon @msol 2019
local log = hs.logger.new('main', 'info')
DEVELOPING_THIS = false -- set to true to ease debugging
HYPER = {'ctrl', 'shift', 'alt', 'cmd'}
-- App bindings
function setUpAppBindings()
-- hyperFocusAll('w', 'React Native Debugger', 'Simulator', 'qemu-system-x86_64')
@tvhung83
tvhung83 / 1pass
Last active April 27, 2020 06:47
Revised version of https://github.com/dcreemer/1pass which supports of template 102
#! /usr/bin/env bash
#
# 1pass -- a simple caching wrapper for the "op" 1Password CLI.
#
# Copyright (C) 2017 David Creemer, (twitter: @dcreemer)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-- A global variable for the Hyper Mode
k = hs.hotkey.modal.new({}, "F17")
-- Trigger existing hyper key shortcuts
-- k:bind({}, 'm', nil, function() hs.eventtap.keyStroke({"cmd","alt","shift","ctrl"}, 'm') end)
-- OR build your own
launch = function(appname)