This file contains 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
package com.scottyab.whatsnewplayground.data | |
import android.content.Context | |
import android.content.SharedPreferences | |
import androidx.security.crypto.EncryptedSharedPreferences | |
import androidx.security.crypto.MasterKeys | |
import com.scottyab.whatsnewplayground.BuildConfig | |
internal class SampleEncPrefs(context: Context) { |
This file contains 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.content.Context; | |
import android.content.pm.PackageInfo; | |
import android.content.pm.PackageManager; | |
import android.content.pm.PackageManager.NameNotFoundException; | |
import android.content.pm.Signature; | |
public class TamperCheck { | |
//we store the hash of the signture for a little more protection | |
private static final String APP_SIGNATURE = "1038C0E34658923C4192E61B16846"; |
This file contains 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
// package me.piebridge; | |
import java.io.IOException; | |
import java.io.RandomAccessFile; | |
import java.math.BigInteger; | |
import java.nio.ByteBuffer; | |
import java.nio.ByteOrder; | |
import java.util.Arrays; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; |
This file contains 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.app.AppComponentFactory; | |
import android.content.pm.ApplicationInfo; | |
import android.util.Log; | |
import java.io.IOException; | |
import java.nio.ByteBuffer; | |
import java.nio.channels.Channels; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.zip.ZipFile; |
This file contains 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
#include <unistd.h> | |
#include <string> | |
#include <cinttypes> | |
#include <android/log.h> | |
#include <sys/system_properties.h> | |
using namespace std; | |
extern "C" { |
This file contains 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
.segment "HEADER" | |
.byte "NES", $1A ; Constant | |
.byte 2 ; 2 x 16KB PRG ROM | |
.byte 1 ; 1 x 8KB CHR ROM | |
.segment "CHARS" | |
;------------------------------------------------------------- | |
; CREATE SPRITES | |
;------------------------------------------------------------- | |
; The following creates one sprite. The following two bitmaps |
This file contains 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
; ___ _ __ ___ __ ___ | |
; / __|_ _ __ _| |_____ / /| __|/ \_ ) | |
; \__ \ ' \/ _` | / / -_) _ \__ \ () / / | |
; |___/_||_\__,_|_\_\___\___/___/\__/___| | |
; An annotated version of the snake example from Nick Morgan's 6502 assembly tutorial | |
; on http://skilldrick.github.io/easy6502/ that I created as an exercise for myself | |
; to learn a little bit about assembly. I **think** I understood everything, but I may | |
; also be completely wrong :-) |
This file contains 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
/** | |
* Educational "Free-list" memory allocator. | |
* | |
* Maintains explicit list of free memory blocks, reuses blocks on free. | |
* Implements "first-fit" strategy. Uses pre-allocated heap of 64 bytes, | |
* with 32-bit machine word size. | |
* | |
* TODO: | |
* | |
* - Implement "best-fit" strategy |
This file contains 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
/** | |
* Writing a Mark-Sweep Garbage Collector in C++. | |
* | |
* This is a source code for the Lecture 9 from the | |
* Essentials of Garbage Collectors course: | |
* | |
* http://dmitrysoshnikov.com/courses/essentials-of-garbage-collectors/ | |
* | |
* See full details in: | |
* |
NewerOlder