- Download AXMLPrinter2.jar
- Build your solution and create an archive (.apk) by selecting Build->Archive...
- After archiving is done, open folder and find the archived *.apk, open the archive (for example using 7Zip) and extract/unzip
AndroidManifest.xml - Open any text editor and type:
start cmd.exe /c "java -jar AXMLPrinter2.jar AndroidManifest.xml > AndroidManifest.plaintext.xml"and save it as a*.batfile in the same directory - Run the
*.batfile and check the resultingAndroidManifest.plaintext.xmlfile. This is the file we will be editing using a shell script - Create the shell script you need. It should target
obj\$configuration\android\AndroidManifest.xmlfor example:(Get-Content 'obj\Release\*\android\AndroidManifest.xml').replace('<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />', '') | Set-Content 'obj\Release\*\android\AndroidManifest.xml'theRemoveAndroidPermission.ps1script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | |
| <title>Untitled Document</title> | |
| <style type="text/css"> | |
| #sampleDialog{ | |
| height:200px; | |
| width:500px; | |
| background:white; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/local/bin/bash | |
| # | |
| # Calomel.org | |
| # https://calomel.org/zfs_health_check_script.html | |
| # FreeBSD 9.1 ZFS Health Check script | |
| # zfs_health.sh @ Version 0.15 | |
| # Check health of ZFS volumes and drives. On any faults send email. In FreeBSD | |
| # 10 there is supposed to be a ZFSd daemon to monitor the health of the ZFS | |
| # pools. For now, in FreeBSD 9, we will make our own checks and run this script |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| GCC security related flags reference. | |
| Source material: | |
| http://security.stackexchange.com/questions/24444/what-is-the-most-hardened-set-of-options-for-gcc-compiling-c-c | |
| https://wiki.gentoo.org/wiki/Hardened_Gentoo | |
| https://wiki.debian.org/Hardening | |
| =================================================================================== | |
| GCC Security related flags and options: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| setup-android-build-tools () { | |
| sudo apt install -y openjdk-8-jdk | |
| mkdir -P ~/Android/sdk | |
| pushd ~/Android/sdk >/dev/null | |
| [ -d tools ] || { | |
| [ -f sdk-tools-linux-3859397.zip ] || wget -c https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip | |
| [ -d tools ] || [ -f sdk-tools-linux-3859397.zip ] && unzip sdk-tools-linux-3859397.zip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct FenvickTree { | |
| struct Node { | |
| int Value; | |
| int Sum; | |
| int Parent; | |
| int Next; | |
| }; | |
| vector<Node> Tree; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @SuppressWarnings({"WeakerAccess", "unused"}) | |
| public abstract class PrimitiveContainerConverter { | |
| public interface ListByteRef extends Supplier<List<? extends Byte>> {} | |
| /** | |
| * Convert Lists of {@link Byte} to array of primitive type byte | |
| * | |
| * usage: array = toPrimitiveArray(() -> list); | |
| */ | |
| public static byte[] toPrimitiveArray(final ListByteRef byteListRef) { | |
| List<? extends Byte> byteList = byteListRef.get(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ReverseSeekBar : SeekBar { | |
| constructor(context: Context) : super(context) { | |
| init() | |
| } | |
| constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) { | |
| init() | |
| } | |
| constructor(context: Context, attrs: AttributeSet?, defStyle: Int) : super(context, attrs, defStyle) { | |
| init() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.annotation.SuppressLint | |
| import android.annotation.TargetApi | |
| import android.app.Notification | |
| import android.app.NotificationChannel | |
| import android.content.Context | |
| import android.os.Build | |
| import androidx.annotation.IntDef | |
| import androidx.annotation.RequiresApi | |
| import androidx.core.app.NotificationCompat | |
| import androidx.core.app.NotificationManagerCompat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE FUNCTION [dbo].[ASCII_TO_GEORGIAN] (@ascii nvarchar(max)) | |
| RETURNS NVARCHAR(MAX) | |
| AS | |
| BEGIN | |
| DECLARE @ret NVARCHAR(max); | |
| SET @ret = | |
| REPLACE( | |
| REPLACE( | |
| REPLACE( | |
| REPLACE( |
OlderNewer