Skip to content

Instantly share code, notes, and snippets.

View stark's full-sized avatar

Abhishek stark

  • Arpanet
View GitHub Profile
@stark
stark / tpm2.md
Created September 24, 2019 15:11 — forked from jblang/tpm2.md
TPM2 Protocol Description

TPM2 Protocol Implementation

Introduction

Frame data is transferred inside packets (similar to DMX, for example). A frame is an image representing a matrix or a light scene.

The packets start and end with one-byte characters. In between are a few control bytes followed by the payload. There is no set size for a payload; it is transmitted with each packet. This makes the protocol quite flexible. There are enough bytes in a single packet for an RGB matrix with 21,845 pixels, but if you just want to control an RGBW lamp, that only requires 9 bytes. The variable frame size means there is no overhead, allowing for maximum transfer speed.

TPM2 Packet Structure

Keybase proof

I hereby claim:

  • I am stark on github.
  • I am abhx (https://keybase.io/abhx) on keybase.
  • I have a public key ASBSTezs4H8Jo0ID_7R1zXOdY1NdbeQWtCkZjy_VoQamiQo

To claim this, I am signing this object:

Hello there! You are currently visiting gopherspace through a
proxy. To learn more about gopher and how to browse it, read this.
______________________________________________________________________
###################################################################
Writing C software without the standard library
Linux Edition
###################################################################
There are many tutorials on the web that explain how to build a
simple hello world in C without the libc on AMD64, but most of them
@stark
stark / pr.md
Created October 15, 2016 17:54 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@stark
stark / quote.pl
Created May 5, 2016 16:52 — forked from dcat/quote.pl
quote.pl for weechat
#!/usr/bin/env perl -w
use strict;
use utf8;
sub quote_cb {
my ($data, $mod, $mod_data, $msg) = @_;
if ($msg =~ /^>/) {
$msg="\x03" . int(rand(15)) . $msg;
}
@stark
stark / Lesson 8.md
Last active August 29, 2015 14:21
LinuxBBQ Academy

Lesson 8 - Package Management II: Housekeeping

Actually, this could be the continuation of the previous lesson.

A real griller keeps his dependency count as low as possible.

And of course a real griller also checks the number of processes running on his system.

He or she enters:

@stark
stark / Lesson 7.md
Last active August 29, 2015 14:21
LinuxBBQ Academy

Lesson 7 - Terminal III: Productivity without overhead

Most daily tasks, like reading and answering emails, listening to music, reading some RSS feeds, calculating the BMI, creating and extracting zip archives, surfing the internet, copying files from one computer to the other or checking the weather forecast can be accomplished in the terminal.

Some of the people here at the BBQ even say, that this is the preferred way of doing something.

Why?

To answer this question, check the links at the end of this lesson.

@stark
stark / Lesson 5.md
Last active August 29, 2015 14:21
LinuxBBQ Academy

Lesson 5 - Terminal I: Configuration

Just recently a fellow griller asked a very good question:

"How can I change the colors of my terminal?"

Read the answers here: http://ow.ly/NkUt4

We should mention, though, that this only works for the terminals xterm and rxvt and it's modifications. More about this later. We recommend to stay with the default terminal emulator (xterm in the Academy release), at least for a few days. It has it strengths, especially in size, speed, dependency count and customization.

@stark
stark / Lesson 4.md
Last active November 14, 2020 02:45
LinuxBBQ Academy

Lesson 4 - X Startup Customization

Whenever you start your computer and boot into Linux, a series of files are read and executed in a certain order.

We will cover the boot process a tad later in this document, but let us take a look at the part where you enter your username and password and everything thereafter.

This is where the shell starts, as the first interactive environment of your system. After entering username and password, the files ~/.bash_profile and ~/.bashrc are read or sourced.

Let's take a look at ~/.bash_profile first:

@stark
stark / Lesson 3.md
Last active April 17, 2016 15:58
LinuxBBQ Academy

Lesson 3 - Package Management I: Fill it up

You probably want to do more than looking at the prompt of your shell.

Only a few tools are added to the Academy distro, one of them is ceni, a very helpful little program that sets up the wired or wireless connection for you.

ceni needs to be run as root. {: .callout .warning}

So open a terminal and Enter: