Skip to content

Instantly share code, notes, and snippets.

@kmark
kmark / extractMotionPhotos.sh
Last active November 3, 2020 14:38
Samsung Galaxy Motion Photo extraction tool
#!/bin/bash
# Copyright 2017 Kevin Mark
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
#!/bin/sh
# Rebuilds flex to avoid the following:
# flex-2.5.39: loadlocale.c:130: _nl_intern_locale_data:
# Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed.
# Aborted (core dumped)
# --
# Run this in your repo root after a repo sync
# Tested on Ubuntu 18.04.02 LTS
@kmark
kmark / profinder.php
Created August 21, 2015 15:50
ProFinder - The ProGuard obfuscation tracker.
#!/usr/bin/env php
<?php
/*******************************************************************************************************************
* ProFinder v1.0 *
* http://forum.xda-developers.com/android/software/profinder-proguard-obfuscation-tracker-t3183647 *
*******************************************************************************************************************
* Copyright 2015 Kevin Mark *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
@kmark
kmark / mtrandout.php
Last active January 30, 2019 09:19
Does about 15 MiB/s on my machine
#!/usr/bin/env php
<?php
mt_srand(random_int(PHP_INT_MIN, PHP_INT_MAX));
while (true) {
$a = [];
for ($i = 0; $i < 10000; $i++) {
$a[] = mt_rand_short();
}
#!/usr/bin/env php
<?php
/*
* Screencast.com Account Media Downloader
*
* Copyright 2018 Kevin Mark
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

Keybase proof

I hereby claim:

  • I am kmark on github.
  • I am kmark (https://keybase.io/kmark) on keybase.
  • I have a public key ASD87DuZhJZvhUxayBp3iBYimHH-qy9qOdbY6yIhnFt3Wgo

To claim this, I am signing this object:

// https://www.reddit.com/r/programmingcirclejerk/comments/8f7gjg/psa_there_are_over_1000_people_in_the_us_named/dy1c4ey/
fn main() {
const JERK: &str = "INFINITY";
fn exaggerate(mut acc: String, ch: char) -> String {
acc.push(ch);
acc.push(' ');
acc
}
; https://www.reddit.com/r/programmingcirclejerk/comments/8ebz88/the_major_difference_between_java_and_golang_is/dxuq7l0/
(defun square-val (x y str len)
(cond
((eql y 0) (elt str x))
((eql x 0) (elt str y))
((and (eql x len) (eql y len)) (elt str 0))
((eql y len) (elt str (- len x)))
((eql x len) (elt str (- len y)))
(t #\Space)))
From 6a13d2435af223a6164734b3e9255d686578e5c2 Mon Sep 17 00:00:00 2001
From: Kevin Mark <kmark937@gmail.com>
Date: Sat, 8 Jul 2017 19:45:21 -0400
Subject: [PATCH] Allow entire file to match or first 10241 bytes
---
test/test_download.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/test/test_download.py b/test/test_download.py
/*******************************************************************************
* Copyright © 2014 Kevin Mark *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
* You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, software *