Skip to content

Instantly share code, notes, and snippets.

Use this in combination with ADB to remove any and all apps from your device:
List packages:
adb shell pm list packages [-d|e|s|3|u] > packs.txt
The flags can be used to filter as follows:
-d: Disabled, -e: Enabled, -s: System, -3: 3d Party, -u: Uninstaled.
This will dump all currently installed packaged (including factory default system ones) into a text file called "packs.txt"
If the package you are looking for is named strangely, use the play store on your PC as it lists the package name in the URL.
Uninstall package:
@UltraSabreman
UltraSabreman / YourWorldOfText "Hacks"
Created November 20, 2015 02:13
Some random js bs for your world of text
//window.w.doGoToCoord(y, x);
var SpamClass = (function() {
var spamID = -1;
spam = function(tsX, tsY, width, heigth, str) {
spamID = setInterval(tsX, tsY, width, heigth, str, 1000);
}
stopSpam = function() {
@UltraSabreman
UltraSabreman / InstantiateObject.cs
Last active August 29, 2015 14:23
Instantiate almost any obect by it's type, as long as it has a constructor OR a factory method. Some may fail due to needing specific string formats. This also allows you to add a single element to any collection that impliments an "Add" method.
/// <summary>
/// This will Instantiate almost any object with garbage/default values
/// as long as that object has either 1) a constructor or 2) a static factory method.
///
/// Some objects may fail due to needing a strictly formmated string as an argument.
/// </summary>
/// <param name="objType">The type of the object you wish to create</param>
/// <returns>The created object or NULL if creation failed.</returns>
///
public object InstantiateObject(Type objType, bool AddToCollection = false) {
@UltraSabreman
UltraSabreman / ViewModelNotifier.cs
Last active August 29, 2015 14:04
Allows you to make properties execute the PropertyChanged event, with less ugly code.
public class ViewModelNotifier : INotifyPropertyChanged {
private Dictionary<String, Object> propertyValues = new Dictionary<String, Object>();
public event PropertyChangedEventHandler PropertyChanged;
protected void SetProp<T>(T value, [CallerMemberName] string property = null) {
propertyValues[property] = value;
OnPropertyChanged(property);
}
protected T GetProp<T>([CallerMemberName] string property = null) {
try {
@UltraSabreman
UltraSabreman / DumpException
Last active August 29, 2015 14:04
Dumps an C# exception to the console in a some-what formatted fasion. (Uses my varardic print function).
public static void DumpException(Exception e) {
Func<int, String> getEquals = (count) => {
String s = "";
for (int i = 0; i < count; i++)
s += "=";
return s;
};
PrintLine(ConsoleColor.White, ConsoleColor.Red, "====EXCEPTION====");
@UltraSabreman
UltraSabreman / CounsoleVarargPrint
Last active August 29, 2015 14:04
Lets you print any number of strings with any colors in one function call. Way less cumbersome then constantly switching colors.
/// <summary>
/// Lets you print stuff. Any number of objects.
/// To change forground color, pass one console color and then another object (ie: print(ConsoleColor.Red, "this will be red")).
/// To change both fore and back colors, path two console colors then another object (ie: print(ConsoleColor.Red, ConsoleColor.White, "this will be red on white")).
/// </summary>
/// <param name="stuff">Console colors, and objects to print.</param>
public static void PrintLine() { PrintLine(null); }
public static void PrintLine(params object[] stuff) { Print(stuff); Console.WriteLine(); }
public static void Print(params object[] stuff) {
if (stuff == null) {
@UltraSabreman
UltraSabreman / configs.cs
Created July 21, 2014 20:16
A global configuration manager class for c#. This version uses JSON.net, but that can be replaced with any library/class that can serialize and de-serialize objects.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Data;
using Newtonsoft.Json;
namespace Program {
using ConfigMap = Dictionary<String, Object>;
@UltraSabreman
UltraSabreman / Asus_k55n_linux_problems
Last active August 29, 2015 14:01
Asus K55n laptop Arch Linux problems and solutions.
On kernel 3.14.14
Date: 05/15/2014
** Basically my laptop only has the base arch packages + all gnome related stuff (And a few other misc, apps).
** It also has a bunch of problems right out of the box, so I'm documenting my found solutions to them here
** for my own future reference and hopefully someone elses benefit.
=============
= Solved