Skip to content

Instantly share code, notes, and snippets.

View danielhum's full-sized avatar

Daniel Hum danielhum

View GitHub Profile
@danielhum
danielhum / wsl2-network.ps1
Created September 5, 2020 04:33 — forked from daehahn/wsl2-network.ps1
WSL 2 TCP NETWORK FORWARDING
# WSL2 network port forwarding script v1
# for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell,
# for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter.
# written by Daehyuk Ahn, Aug-1-2020
# Display all portproxy information
If ($Args[0] -eq "list") {
netsh interface portproxy show v4tov4;
exit;
}
@danielhum
danielhum / gist:4356954
Last active December 10, 2015 01:18
based on http://berzniz.com/post/15975242632/export-your-appannie-data . see blog post for how to get your account id
#!/usr/bin/env ruby
APPANNIE_USERNAME = "your_appannie_username"
APPANNIE_PASSWORD = "your_appannie_password"
APPANNIE_ACCOUNT_ID = "your_appannie_account_id"
start_date = 1.year.ago.strftime("%Y-%m-%d")
end_date = Date.today.strftime("%Y-%m-%d")
# config/initializers/active_admin_mongoid_patch.rb
require "active_admin"
require "active_admin/resource_controller"
require 'ostruct'
module ActiveAdmin
class Namespace
# Disable comments
def comments?