Skip to content

Instantly share code, notes, and snippets.

View rosuH's full-sized avatar
👻
Wubba lubba dub dub

rosuH

👻
Wubba lubba dub dub
View GitHub Profile

Install Android SDK CLI Ubuntu 20.04 WSL2 (Work in Progress)

Install Java 8

sudo apt update

sudo apt install openjdk-8-jdk-headless
@roalcantara
roalcantara / xcode-uninstall.sh
Created October 24, 2020 11:41
xcode-uninstall
killall Xcode
xcrun -k
xcodebuild -alltargets clean
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache"
rm -rf /Applications/Xcode.app
rm -rf ~/Library/Caches/com.apple.dt.Xcode
rm -rf ~/Library/Developer
rm -rf ~/Library/MobileDevice
rm -rf ~/Library/Preferences/com.apple.dt.Xcode.plist
@XLNCs
XLNCs / AdobeFixAMD
Last active March 21, 2024 15:33
To fix adobe products crashes on AMD hackintosh
MOVED HERE:
https://gist.github.com/naveenkrdy/26760ac5135deed6d0bb8902f6ceb6bd
@qwertyuiop6
qwertyuiop6 / TranslateToChineseOnYouTube.user.js
Last active March 10, 2024 14:44
🌍 🪄 🀄 Translate to Chinese automatically. Youtube自动点击翻译字幕到中文简体
// ==UserScript==
// @name YouTube字幕自动选择翻译->中文简体
// @namespace http://tampermonkey.net/
// @version 1.2
// @description translate to Chinese automatically. 自动点击字幕翻译到中文简体
// @author qwertyuiop6
// @match https://www.youtube.com/*
// @grant none
// ==/UserScript==
@chenshaoju
chenshaoju / script running adb shell
Last active March 25, 2024 04:58
Android 8.x Captive Portal Server for Mainland China
settings put global captive_portal_mode 1
settings put global captive_portal_use_https 1
settings put global captive_portal_http_url http://connect.rom.miui.com/generate_204
settings put global captive_portal_https_url https://connect.rom.miui.com/generate_204
settings put global captive_portal_fallback_url http://captive.v2ex.co/generate_204
settings put global captive_portal_other_fallback_urls http://www.google.cn/generate_204
/*
* Copyright (C) 2017 The Android Open Source Project
*
* 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
@sunwicked
sunwicked / CustomLayoutManager.java
Created November 4, 2017 15:06
Custom LinearLayoutManager for scaling, fading and snapping children to top
class CustomLayoutManager extends LinearLayoutManager {
private final float mShrinkAmount = 0.15f;
private final float mShrinkDistance = 0.9f;
Context mContext;
//Make an instance variable at the top of you LayoutManager
private static final float MILLISECONDS_PER_INCH = 50f;
public CustomLayoutManager(Context context) {
super(context);
mContext = context;
@danieleggert
danieleggert / GPG and git on macOS.md
Last active April 22, 2024 07:46
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys
@kmark
kmark / AudioRecordActivity.java
Last active January 4, 2024 11:01
An example of how to read in raw PCM data from Android's AudioRecord API (microphone input, for instance) and output it to a valid WAV file. Tested on API 21/23 on Android and API 23 on Android Wear (modified activity) where AudioRecord is the only available audio recording API. MediaRecorder doesn't work. Compiles against min API 15 and probabl…
/*
* 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
@lopspower
lopspower / README.md
Last active April 25, 2024 12:17
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