Skip to content

Instantly share code, notes, and snippets.

View cjekel's full-sized avatar

Charles Jekel cjekel

View GitHub Profile
@cjekel
cjekel / gist:cc82087e27df020967ecf40060bdf7fd
Created May 3, 2019 18:13
Powershell command line for sorting by filesize
rem http://winteltools.com/directory-size/
ls | add-member -force -PassThru -name length -type scriptproperty -value { ls $this -Recurse -force | Measure-Object length -Sum | select -ExpandProperty sum } | Sort-Object length -Descending | Format-Table Name, @{label=“length”; expression={$_.length/1GB}; f=“{0:N2}”} -autosize
@varhub
varhub / Android - Enable ADB from recovery.md
Created December 23, 2016 17:54
Android - Enable ADB from recovery

Android - Enable ADB from recovery

Credits to @TheOnlyAnil-@Firelord[^stackoverflow]

  • Requirements: a) stock recovery + rooted phone b) custom recovery

  • Files changed:

@MaxBareiss
MaxBareiss / frechet.py
Last active July 7, 2023 13:36
Fréchet Distance in Python
# Euclidean distance.
def euc_dist(pt1,pt2):
return math.sqrt((pt2[0]-pt1[0])*(pt2[0]-pt1[0])+(pt2[1]-pt1[1])*(pt2[1]-pt1[1]))
def _c(ca,i,j,P,Q):
if ca[i,j] > -1:
return ca[i,j]
elif i == 0 and j == 0:
ca[i,j] = euc_dist(P[0],Q[0])
elif i > 0 and j == 0:
@h1k3r
h1k3r / hostname.lua
Created June 25, 2014 19:52
Lua - get hostname
local _M = {}
function _M.getHostname()
local f = io.popen ("/bin/hostname")
local hostname = f:read("*a") or ""
f:close()
hostname =string.gsub(hostname, "\n$", "")
return hostname
end
return _M