Skip to content

Instantly share code, notes, and snippets.

View flashfoxter's full-sized avatar
🏠
Working from home

Konstantin Le flashfoxter

🏠
Working from home
View GitHub Profile
@flashfoxter
flashfoxter / release-android-debuggable.md
Created March 6, 2018 11:13 — forked from nstarke/release-android-debuggable.md
How to make a Release Android App debuggable

How to make a Release Android App debuggable

Let's say you want to access the application shared preferences in /data/data/com.mypackage.
You could try to run adb shell and then run-as com.mypackage ( or adb shell run-as com.mypackge ls /data/data/com.mypackage/shared_prefs), but on a production release app downloaded from an app store you're most likely to see:

run-as: Package 'com.mypackage' is not debuggable
1. `vim /etc/syslog.conf`
2. Add to end of file: `cron.* /var/log/cron.log`
3.
```
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.syslogd.plist
sudo launchctl load /System/Library/LaunchDaemons/com.apple.syslogd.plist
```
[where-is-the-cron-log-file-in-macosx-lion](http://apple.stackexchange.com/questions/38861/where-is-the-cron-log-file-in-macosx-lion)
0 = Success
1 = Operation not permitted
2 = No such file or directory
3 = No such process
4 = Interrupted system call
5 = Input/output error
6 = No such device or address
7 = Argument list too long
8 = Exec format error
@flashfoxter
flashfoxter / gist:e080baba0bd664ba9d376e4792ff69e6
Created June 16, 2016 11:21 — forked from hanssens/gist:8182406
Fix for the UnauthorizedAccessException in Xamarin Studio (MonoDevelop) when running a MVC 4/5 website on Mac OSX.

Fix for the UnauthorizedAccessException in Xamarin Studio

This is a fix for the UnauthorizedAccessException in Xamarin Studio (MonoDevelop) when running a MVC 4/5 website on Mac OSX.

The error:

System.UnauthorizedAccessException
Access to the path "/Library/Frameworks/Mono.framework/Versions/3.2.5/etc/mono/registry" is denied.
 
@flashfoxter
flashfoxter / CleanUpWindow.cs
Created June 14, 2016 22:41 — forked from karl-/CleanUpWindow.cs
New interface for removing unused Unity assets
using UnityEngine;
using UnityEditor;
using System.IO;
using System.Collections;
using System.Collections.Generic;
public class CleanUpWindow : EditorWindow
{
bool groupEnabled = true;
List<string> usedAssets = new List<string>();
@flashfoxter
flashfoxter / drag-drop-wpf.cs
Created January 5, 2016 05:01 — forked from cabrel/drag-drop-wpf.cs
Drag & Drop in C# w/ WPF
// WPF Canvas Object
// Canvas LayoutCanvas;
//
// Events Required
//
// Canvas_PreviewMouseLeftButtonDown
// Canvas_PreviewMouseMove
// Canvas_PreviewMouseLeftButtonUp
// Parent_PreviewKeyDown
//
@flashfoxter
flashfoxter / AlphanumComparatorFast.cs
Created December 23, 2015 14:15 — forked from ngbrown/AlphanumComparatorFast.cs
Alphanumeric compariter using Linq and an EnumerableComparer.
namespace Utilities
{
using System.Collections;
using System.Collections.Generic;
/// <remarks>
/// From http://www.dotnetperls.com/alphanumeric-sorting
/// </remarks>
public class AlphanumComparatorFast : IComparer<string>, IComparer
{
@flashfoxter
flashfoxter / EventMapFragment.java
Created November 5, 2015 11:34 — forked from LuckOfWise/EventMapFragment.java
MapFragmentをTabの要素として表示したい to @shikajiro
package jp.kickhost.eventnavi;
import java.util.ArrayList;
import jp.kickhost.localsearch.model.Event;
import android.app.Fragment;
import android.os.Bundle;
import android.text.format.Time;
import android.util.Log;
import android.view.InflateException;
/* Implement the circular scrolling list on Unity3D.
* Author: LanKuDot < https://github.com/LanKuDot; [email protected] >
*/
using UnityEngine;
using System.Collections;
public class ListBox: MonoBehaviour
{
public int listBoxID;
public int numOfListBox;
var target : Transform;
function Update(){
//the direction vector to target
var dir = (target.position - transform.position).normalized;
var hit :RaycastHit;
if (Physics.Raycast(transform.position,transform.forward,hit ,20)){
//no self collision
if(hit.transform !=transform)