Skip to content

Instantly share code, notes, and snippets.

View knoxxs's full-sized avatar

Abhishek Gupta knoxxs

View GitHub Profile
// item = document.querySelectorAll("#transactions-section-desktop #transaction-desktop")[7]
csv = '"' + ['Date','Deposit','Withdrawl','Description'].join('","') + '"\n', count = 0;
document.querySelectorAll("#transactions-section-desktop #transaction-desktop").forEach(function (item) {
console.log('#' + ++count + '\n' + item.innerText);
leftItems = item.querySelectorAll("a.a-expander-header .a-row .a-text-left");
if (leftItems.length != 1) {
throw 'leftItems is not equal to 1.\n' + item.innerText;
}
leftItem = leftItems[0];
@knoxxs
knoxxs / 0. Writing Code: Java
Last active May 27, 2020 05:06
Different examples like use existing properties & set new properties, send message, make API call & send message, importing python's internal libs, parse Rest API block response
Please follow the examples below. To learn more please refer to the docs:
@knoxxs
knoxxs / genInfo_bashrc.sh
Created October 22, 2013 10:13
Generate System Information
#Function to print info about your system. Usage: genInfo <filename> [-v(Verbose = more)] [-n(Network)]
function genInfo() {
echo -e '=======================\nLinux distribution and version\n=======================\n\n' > $1;
lsb_release -a >> $1;
echo -e '\n\n=======================\nKernel Version\n=======================\n\n' >> $1;
uname -mrs >> $1
uname -a >> $1
cat /proc/version >> $1;
@knoxxs
knoxxs / mines
Last active December 19, 2015 10:49
/**
* Definition for singly-linked list.
* public class ListNode {
* int val;
* ListNode next;
* ListNode(int x) {
* val = x;
* next = null;
* }
* }
@knoxxs
knoxxs / passStructPointerThread.c
Created November 6, 2012 15:58
Passing a structure to a thread in C
/////////////////////////////////////////////___Global___////////////////////////////////////////////
struct myStruct{
int a;
int b;
};
/////////////////////////////////////////////___main Function___////////////////////////////////////////////
@knoxxs
knoxxs / regcomp.c
Created October 29, 2012 18:45
API of regcomp
int regcomp(regex_t *preg, const char *regex, int cflags);
preg - It is a pointer to a structure regex_t.
regex - Pointer to a null terminated string which contains the pattern
cflags - bitwise-or of one or more of the following:
REG_EXTENDED
Use POSIX Extended Regular Expression syntax when interpreting regex. If not set, POSIX Basic Regular Expression syntax is used.
@knoxxs
knoxxs / Enumeration.c
Created October 4, 2012 10:29
Basic definition Example of Enumeration in C
#include<stdio.h>
int main(){
enum Exit_Code {success, failure};
return 0;
}