Skip to content

Instantly share code, notes, and snippets.

@nufeng1999
nufeng1999 / InstallWSA.md
Last active April 19, 2024 00:02
[安装 Windows Subsystem for Android™️ ] 安装 Windows Subsystem for Android™️

1.获得 WAS 微软商店链接地址

https://www.microsoft.com/store/productId/9P3395VX91NR

2.下载 WAS 安装包

安装包抓包网址
https://store.rg-adguard.net/ 在这里输入上述商店链接,右边要选择Slow通道
(共有四个选项,分别是Fast,Slow,RP和Retail,分别对应Windows的Dev渠道,Beta渠道,RP渠道和正式版,目前只有Beta版本有发布)
找到最下面名为
"MicrosoftCorporationII.WindowsSubsystemForAndroid_*.msixbundle"
的包进行下载,即可获取最新的Beta版本的抓包

@xdite
xdite / 2017-06-01.md
Last active June 22, 2017 07:18
参与全栈学习这么久,你觉得自己和之前最大的不同是? (直播问卷答案-共94份答案)

参与全栈学习这么久,你觉得自己和之前最大的不同是?

对编程有了系统的概念,之前总是从入门到放弃,这次终于自己能够做出完整的作品,对于自己学习其它技能的自信心也大大增强了,自己的小创意有了实现的能力,对于编程的越来越有热情。

关于全栈,之前一直觉得自己很全能,什么都会一点,但是在参加 jdstore 比赛的时候发现,一个人的时间是非常有限的,和他人配合能够大大的提高效率,大家一起做才能够在有限的时间内完成理想中的工作量,所以自己会做是一方面,懂得和人配合,团队之间的沟通也非常重要。

参与全栈学习这么久,你觉得自己和之前最大的不同是?

  1. 学会了主动学习,对自己更加自信,不再惧怕挑战。
  2. 每日写orid,让自己的逻辑更加清楚。
@lopspower
lopspower / README.md
Last active April 26, 2024 07:55
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@Pkmmte
Pkmmte / WindowInsetsFrameLayout.java
Last active March 25, 2024 13:55
A FrameLayout subclass that dispatches WindowInsets to its children instead of adjusting its padding. Useful for Fragment containers.
package com.pkmmte.widget;
import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.util.AttributeSet;
import android.view.WindowInsets;
import android.widget.FrameLayout;
/**
@johnbear724
johnbear724 / gist:c189782efd1eaa63ddea
Last active August 29, 2015 14:08
使用Drawables

该文档翻译自 Android 5.0 文档中对 Material Design 的介绍,原文地址:http://developer.android.com/training/material/drawables.html

Drawables 的以下功能帮助你在你的应用中实现 Material Design:

  • 将图像染色
  • 提取图像中的显著颜色
  • 矢量图像(Vector Drawables)

该课程向你展示如何在你的应用中使用这些特性。

@doridori
doridori / ViewTreeObserver_Ex.java
Last active August 29, 2015 13:56
Grabbing content view dimensions via ViewTreeObserver - all Display methods have no guarantee if they will include system and status bars in height
//inside a fragment. If in an Activity you could use findViewById(Window.ID_ANDROID_CONTENT);
getView().getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener()
{
@Override
public void onGlobalLayout()
{
//do something like measure a view etc
View content = getWindow().findViewById(Window.ID_ANDROID_CONTENT);
Log.d("DISPLAY", content.getWidth() + " x " + content.getHeight());
@mcxiaoke
mcxiaoke / ProxySettings.java
Created February 7, 2014 05:56
Proxy Settings for Android WebView
package com.mcxiaoke.urlexpander;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.Intent;
import android.net.Proxy;
import android.os.Build;
import android.os.Parcelable;
import android.util.ArrayMap;
import org.apache.http.HttpHost;
@gmodarelli
gmodarelli / Setup Solarized for Gnome on Ubuntu 13.04.md
Last active July 14, 2020 15:59
Setup Solarized for Gnome on Ubuntu 13.04

Dark version

wget --no-check-certificate https://raw.github.com/seebi/dircolors-solarized/master/dircolors.ansi-dark
mv dircolors.ansi-dark .dircolors
eval `dircolors ~/.dircolors`

git clone https://github.com/sigurdga/gnome-terminal-colors-solarized.git
cd gnome-terminal-colors-solarized
./set_dark.sh
@romannurik
romannurik / AndroidCreateGhostIcon.java
Created June 14, 2013 06:28
Android ColorMatrixColorFilter example: Creates a 'ghost' bitmap version of the given source drawable (ideally a BitmapDrawable). In the ghost bitmap, the RGB values take on the values from the 'color' argument, while the alpha values are derived from the source's grayscaled RGB values. The effect is that you can see through darker parts of the …
/**
* Creates a 'ghost' bitmap version of the given source drawable (ideally a BitmapDrawable).
* In the ghost bitmap, the RGB values take on the values from the 'color' argument, while
* the alpha values are derived from the source's grayscaled RGB values. The effect is that
* you can see through darker parts of the source bitmap, while lighter parts show up as
* the given color. The 'invert' argument inverts the computation of alpha values, and looks
* best when the given color is a dark.
*/
private Bitmap createGhostIcon(Drawable src, int color, boolean invert) {
int width = src.getIntrinsicWidth();
@keyboardr
keyboardr / FragmentUtils.java
Last active March 8, 2019 05:30
Utility method for getting the appropriate parent of a Fragment for a given callback interface.
import android.support.v4.app.Fragment;
public class FragmentUtils {
/**
* @param fragment
* The Fragment whose parent is to be found
* @param parentClass
* The interface that the parent should implement
* @return The parent of fragment that implements parentClass,