This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Non-blocking Breathing LED | |
* Kevin Mark, 2017 | |
* https://kmark.io | |
* | |
* Adapted from: | |
* Breathing sleep LED, like on a Mac. | |
* Jeremy Saglimbeni 2011 | |
* http://thecustomgeek.com/2011/06/17/breathing-sleep-led/ | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z ${1+x} ]; then | |
workdir=${PWD} | |
else | |
workdir=${1} | |
fi | |
find "${workdir}" -name '.DS_Store' -type f -delete | |
find "${workdir}" -name '.Trashes' -type d -delete |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright 2012 by Johnson Controls | |
__________________________________________________________________________ | |
Filename: systemApp.js | |
__________________________________________________________________________ | |
Project: JCI-IHU | |
Language: EN | |
Author: awoodhc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
$repoId = 'com.versobit.kmark.xhangouts'; | |
$ghId = 'kmark/XHangouts'; | |
preg_match_all('/([\\d,]+) in total/m', fgc('http://repo.xposed.info/module/' . $repoId), $matches); | |
$repoCount = array_reduce($matches[1], function($carry, $item) { | |
return $carry + str_replace(',', '', trim($item)); | |
}, 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2016 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HueFromRgb { | |
// Retrieves the hue value in degrees from a packed (A)RGB color. | |
// Adapted from a C algorithm by Eugene Vishnevsky. | |
// http://www.cs.rit.edu/~ncs/color/t_convert.html | |
public static float hueFromRgb(int rgb) { | |
int r = (rgb >> 16) & 0xFF; | |
int g = (rgb >> 8) & 0xFF; | |
int b = rgb & 0xFF; | |
float min = Math.min(Math.min(r, g), b); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
traces=10 | |
interval=5 | |
jps -mv | while read -r line; do | |
if [[ $line =~ ^([0-9]+).*clion.*$ ]]; then | |
printf "CLion running with PID %s\n" ${BASH_REMATCH[1]} | |
for ((i = 1; i <= $traces; i++)); do | |
printf "%d... " $i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.versobit.kmark.gist; | |
import android.app.Application; | |
import android.content.Context; | |
import de.robv.android.xposed.IXposedHookLoadPackage; | |
import de.robv.android.xposed.XC_MethodHook; | |
import de.robv.android.xposed.callbacks.XC_LoadPackage; | |
import static de.robv.android.xposed.XposedHelpers.findAndHookMethod; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int gcdIterative(int a, int b) { | |
while(true) { | |
if(a > b) { | |
a -= b; | |
continue; | |
} | |
if(b > a) { | |
b -= a; | |
continue; | |
} |