Skip to content

Instantly share code, notes, and snippets.

@DanielsSt
DanielsSt / [Java][Android] Xposed change settings icon colors
Created July 9, 2017 19:38
[Java][Android] Xposed change settings icon colors
public class Main implements IXposedHookInitPackageResources {
@Override
public void handleInitPackageResources(final XC_InitPackageResources.InitPackageResourcesParam initPackageResourcesParam) throws Throwable {
if(initPackageResourcesParam.packageName.equals("com.android.settings")){
initPackageResourcesParam.res.hookLayout(initPackageResourcesParam.packageName, "layout", "dashboard_tile", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
ImageView icon = (ImageView) liparam.view.findViewById(liparam.res.getIdentifier("icon", "id","com.android.settings"));
icon.setColorFilter(Color.RED);
}
@DanielsSt
DanielsSt / pitagors_vuejs_test.html
Last active February 1, 2016 17:04
Mazs vue.js tests ar nezināmas taisnleņķa trijstūra malas aprēķinu
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Vue.js Test</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="http://vuejs.org/js/vue.min.js"></script>
</head>
<body>
@DanielsSt
DanielsSt / [JS] color_blind.html
Created June 29, 2015 15:03
Something, that makes colorblind tests easier, uses HTML5 canvas Demo: http://navideju.tk/blind/
<!DOCTYPE html>
<html>
<head>
<title>ColorBlind helper</title>
<meta charset="UTF-8">
<style type="text/css">
canvas{
border: 1px solid black;
display: block;
@DanielsSt
DanielsSt / [PHP] steam_group.php
Last active August 29, 2015 14:20
Steam group information
$steamurl = "http://steamcommunity.com/groups/gignlv";
//tas arī viss kas jākonfigurē
$xml = file_get_contents($steamurl.'/memberslistxml/');
if(strpos($xml,'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01')===FALSE){
$parsed = simplexml_load_string($xml);
echo "Grupa: ".$parsed->groupDetails->groupName."<br/>";
echo "<img src=".$parsed->groupDetails->avatarFull."><br/>";
echo "Headline: ".$parsed->groupDetails->headline."<br/>";
//echo "Apraksts: ".$parsed->groupDetails->summary."<br/>";