Skip to content

Instantly share code, notes, and snippets.

Davide Spataro knotman90

Block or report user

Report or block knotman90

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:9b4e47dc04e7dbfefe4a
/* *
* Copyright 1993-2012 NVIDIA Corporation. All rights reserved.
*
* Please refer to the NVIDIA end user license agreement (EULA) associated
* with this source code for terms and conditions that govern your use of
* this software. Any use, reproduction, disclosure, or distribution of
* this software and related documentation outside the terms of the EULA
* is strictly prohibited.
*/
#include <stdio.h>
@knotman90
knotman90 / coprocessor.rb
Created Mar 7, 2016 — forked from sankars/coprocessor.rb
Hbase shell commands to load/unload coprocessors
View coprocessor.rb
## To load
disable 'Table'
alter 'Table', METHOD => 'table_att', 'COPROCESSOR' => '/path/to/coprocessors.jar|com.org.xxxx.Coprocessorclass|3|'
enable 'Table'
## To check coprocessor is loaded
describe 'Table'
View Fedora Dynamic Message of the day - motd
#!/bin/bash
# Installation:
#
# 1. vim /etc/ssh/sshd_config
# PrintMotd no
#
# 2. vim /etc/pam.d/login
# # session optional pam_motd.so
#
@knotman90
knotman90 / NERDTree.mkd
Created May 11, 2016 — forked from m3nd3s/NERDTree.mkd
My Vim Cheat Sheet
View NERDTree.mkd

NERDTree

o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|
O.......Recursively open the selected directory..................|NERDTree-O|
View list.c
#include <stdio.h>
#include<stdlib.h>
typedef struct node{
int payload;
node* next;
} node;
void print(node* head){
while(head){
printf("%d ",head->payload);
View cl_complex.cl
/**
Author: Davide Spataro
email:davide.spataro@unical.it
www.davidespataro.it
*/
#define DOUBLE_PRECISION (1)
typedef double2 cl_double_complex;
typedef float2 cl_float_complex;
View keybase.md

Keybase proof

I hereby claim:

  • I am knotman90 on github.
  • I am davidespataro (https://keybase.io/davidespataro) on keybase.
  • I have a public key whose fingerprint is 7D5A 3C6B 50E3 16C3 BAAB 3D12 8069 C984 9E14 40FC

To claim this, I am signing this object:

View ProjectEulerProblem#187.cpp
#include <bits/stdc++.h>
#include <gmpxx.h>
#include <functional>
#include <numeric>
//TYPEDEFS
typedef unsigned long long ull;
typedef signed long long ll;
View ProjectEuler_problem68.cpp
//problem 68---
template<class COLLECTION>
bool cmp_arr(const COLLECTION& v1, const COLLECTION& v2) {
for(int i=0; i<v1.size() ; i++) {
if(v1[i]==v2[i])
continue;
if(v1[i]<v2[i])
return true;
else
return false;
View stefano_mock_interview.cpp
#include <algorithm>
#include <array>
#include <cmath>
#include <iostream>
#include <iterator>
#include <limits>
#include <numeric>
#include <unordered_map>
#include <vector>
using namespace std;
You can’t perform that action at this time.