Skip to content

Instantly share code, notes, and snippets.

View genuinelucifer's full-sized avatar

Abhinav Tripathi genuinelucifer

  • Indore, Madhya Pradesh
View GitHub Profile
@genuinelucifer
genuinelucifer / aws_json_gz_downloader.hpp
Created September 18, 2019 08:47
Downloads a .json.gz file from S3, uncompresses it and converts it to json using nlohmann::json
#pragma once
#include <aws/core/Aws.h>
#include <aws/core/client/ClientConfiguration.h>
#include <aws/core/auth/AWSCredentialsProviderChain.h>
#include <aws/core/utils/logging/LogLevel.h>
#include <aws/s3/S3Client.h>
#include <aws/s3/model/GetObjectRequest.h>
#include <iostream>
#include <fstream>
@genuinelucifer
genuinelucifer / .bash_aliases
Created September 18, 2019 08:36
Commonly used alias functions. Save it in home directory.
alias ownhome='sudo chown -R ${USER}: ~'
alias glon='git log --oneline -n'
# Checkout branch from origin also track it in new branch for easier push/pull later
alias gct='git fetch origin && git checkout --track'
alias ftext='grep -rnwl --exclude-dir=node_modules'
alias dir_size='du -h --max-depth=1 ./ | sort -h'
alias untargz='tar -xvzf'
alias targz='tar -zcvf'
alias gdob='git branch | egrep -v "(^\*|master|develop)" | xargs git branch -D'
# Replace <acc_num> and <email> in command. Pass mfa token as parameter
From 51270ab670ce3b4c7d4987e4f28f9615094bae31 Mon Sep 17 00:00:00 2001
From: Abhinav Tripathi <genuinelucifer@gmail.com>
Date: Wed, 3 Apr 2019 15:13:05 +0900
Subject: [PATCH] Add the ability to specify multiple branches and search
through those
Adapted the patch at https://github.com/caglar10ur/Hound/commit/a9208072a0444cd562592ca1bf348bf816ba4c2a
and added the option to specify allbranches search
---
api/api.go | 35 ++++++++++++++++++-----------
#include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <cstdio>
#include <vector>
#include <cstdlib>
#include <numeric>
#include <sstream>
@genuinelucifer
genuinelucifer / dstep_build_error.txt
Created March 7, 2016 16:16
output for building dstep
$ dub build --vverbose
Using dub registry url 'http://code.dlang.org/'
Refreshing local packages (refresh existing: true)...
Looking for local package map at /var/lib/dub/packages/local-packages.json
Looking for local package map at /home/lucifer/.dub/packages/local-packages.json
Determined package version using GIT: dstep 0.2.2+commit.10.g8b70915
Refreshing local packages (refresh existing: false)...
Looking for local package map at /var/lib/dub/packages/local-packages.json
Looking for local package map at /home/lucifer/.dub/packages/local-packages.json
Collecting dependencies for dstep
@genuinelucifer
genuinelucifer / Dstep build error.txt
Created March 5, 2016 15:51
output of "dub build --vverbose > report.txt >2>&1
Using dub registry url 'http://code.dlang.org/'
Refreshing local packages (refresh existing: true)...
Looking for local package map at C:\ProgramData\dub\packages\local-packages.json
Looking for local package map at C:\Users\Abhinav Tripathi\AppData\Roaming\dub\packages\local-packages.json
Determined package version using GIT: dstep 0.2.2+commit.10.g8b70915
Refreshing local packages (refresh existing: false)...
Looking for local package map at C:\ProgramData\dub\packages\local-packages.json
Looking for local package map at C:\Users\Abhinav Tripathi\AppData\Roaming\dub\packages\local-packages.json
Found dependency dstack 0.0.5
Found dependency mambo 0.0.7
@genuinelucifer
genuinelucifer / constructIgnoreCheck.diff
Created June 15, 2015 07:18
Trying to recreate contructor ignore issue
diff --git a/tests/Basic/Basic.h b/tests/Basic/Basic.h
index baf923f..f9d4e8e 100644
--- a/tests/Basic/Basic.h
+++ b/tests/Basic/Basic.h
@@ -720,3 +720,15 @@ struct CS_VALUE_TYPE ValueTypeArrays
char thirdValueTypeArray[ARRAY_LENGTH];
size_t size;
};
+
+
@genuinelucifer
genuinelucifer / cs_api_out_ptr.diff
Created June 10, 2015 06:23
Fixed CSharp code generation when passing CS_OUT pointer into a function
diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generat
index 90cc6c1..aa983f2 100644
--- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs
+++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs
@@ -2523,7 +2523,10 @@ public struct ParamMarshal
var paramType = param.Type;
Class @class;
- if (paramType.Desugar().TryGetClass(out @class) && @class.IsRef
+ if ( (paramType.Desugar().TryGetClass(out @class) ||
@genuinelucifer
genuinelucifer / csoutError.diff
Created May 29, 2015 08:07
Trying to regenerate issue when passing a CS_API ptr as CS_OUT!
diff --git a/tests/Basic/Basic.h b/tests/Basic/Basic.h
index 488dd2c..d4d07bd 100644
--- a/tests/Basic/Basic.h
+++ b/tests/Basic/Basic.h
@@ -710,3 +710,21 @@ public:
bool operator ==(const DifferentConstOverloads& other);
bool operator ==(int number) const;
};
+
+#define CS_API
@genuinelucifer
genuinelucifer / csapiout.diff
Created May 28, 2015 12:08
Trying to pass a CS_API class into a function as CS_OUT
diff --git a/tests/Basic/Basic.h b/tests/Basic/Basic.h
index 488dd2c..178c5be 100644
--- a/tests/Basic/Basic.h
+++ b/tests/Basic/Basic.h
@@ -710,3 +710,16 @@ public:
bool operator ==(const DifferentConstOverloads& other);
bool operator ==(int number) const;
};
+
+#define CS_API