Skip to content

Instantly share code, notes, and snippets.

View NandanDesai's full-sized avatar
:octocat:
open sourcing...

Nandan Desai NandanDesai

:octocat:
open sourcing...
View GitHub Profile
@NandanDesai
NandanDesai / Driver.c
Last active April 21, 2024 09:34
A Filter Driver for the TPM device object to perform access control on it // for Windows (kernel mode)
/*
@brief This file is a simple working example of how to attach a Filter Driver to the TPM on Windows
and perform access control on TPM commands before they reach the TPM driver.
Copyright 2024 Nandan Desai
License: MIT
*/
#include <ntddk.h>
// Define filter driver's device extension structure
Bundle bundle=this.getIntent().getExtras();
String name=bundle.getString("name");
Intent intent = new Intent(FirstActivity.this, SecondActivity.class);
intent.putExtra("name","nandan");
startActivity(intent);
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".FirstActivity">
</android.support.constraint.ConstraintLayout>
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class FirstActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_first);
}
@NandanDesai
NandanDesai / docker-compose.yml
Created March 14, 2019 12:05
tor hidden service using docker
version: "2"
services:
db:
image: mariadb:latest
environment:
- MYSQL_ROOT_PASSWORD=root
volumes:
- ./database:/var/lib/mysql
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest