Skip to content

Instantly share code, notes, and snippets.

View alichtman's full-sized avatar
🏡
$HOME

Aaron Lichtman alichtman

🏡
$HOME
View GitHub Profile
@alichtman
alichtman / Sample Stage 2
Last active April 25, 2019 08:32
Sample Stage 2
This is a sample second stage of an infection. This is part of https://github.com/alichtman/malware-techniques
As the great philosopher Drake once said: "If you're reading this, it's too late."
@alichtman
alichtman / logging.c
Last active June 2, 2020 09:44
Logging Macros in C
#define DEBUG 1
#if DEBUG == 1
#define LOG(...) fprintf(stderr, "\x1b[35m[%s:%d] \x1b[32m%s()\x1b[0m: ", __FILE__, __LINE__, __func__); fprintf(stderr, __VA_ARGS__)
#else
#define LOG(...)
#endif
int main(){
int some_param = 2;
@alichtman
alichtman / python-zip-unpack-in-js
Last active October 9, 2018 07:06
Javascript implementation of Python zip and unpack
/**
* Takes three arrays and zips them into a list of lists like this:
*
* [1,2,3]
* [a,b,c] -> [ [1,a,!], [2,b,@], [3,c,#] ]
* [!,@,#]
*/
function zipThreeArrays(a, b, c) {
let zipped = [];
for (var i = 0; i < a.length; i++) {
@alichtman
alichtman / refined-github-disabled-features
Created May 7, 2018 08:39
Features disabled for sindresorhus/refined-github
https://github.com/sindresorhus/refined-github
more-dropdown hide-useless-newsfeed-events add-releases-tab hide-own-stars
@alichtman
alichtman / pypi_bigquery
Created April 1, 2018 22:49
Check PyPi Download Count with Google BigQuery
# Run this query on https://bigquery.cloud.google.com
# to see how many downloads a PyPi package has since TIMESTAMP
```
SELECT COUNT(*) as download_count
FROM TABLE_DATE_RANGE(
[the-psf:pypi.downloads],
TIMESTAMP("2018-03-00"),
CURRENT_TIMESTAMP()
)

Keybase proof

I hereby claim:

  • I am alichtman on github.
  • I am alichtman (https://keybase.io/alichtman) on keybase.
  • I have a public key ASCKjaLSi_03_2vBfzwop6NH9llTWNsHm9zZNA6QOtcFVgo

To claim this, I am signing this object: