Skip to content

Instantly share code, notes, and snippets.

View nikhedonia's full-sized avatar
💭
actively open-sourcing

Gaetano Checinski nikhedonia

💭
actively open-sourcing
View GitHub Profile
// Jyt is a REPL for C++
// You can write code interactively
// Highlight some code and press alt-enter to execute it
// For example:
auto x = "hello world";
// Now you can query the value in the terminal on the right
// e.g. "x"
@nikhedonia
nikhedonia / linkedIn-invite-all.js
Last active August 15, 2016 00:47
invites everybody who shows up on your search page
function inviteAll(i, clickTime, loadTime) {
i = (i !== undefined) ? i : 100; // how many people you like to add ?
clickTime = clickTime||350; // how quick can a human click ?
loadTime = loadTime||1000; // wait till next page is loaded
if (i<=0) return;
var invite = document.
querySelector('a[href^="/people/invite"]:not(.invite-sent)');
// check if there a people to invite
if (invite) {
invite.click();
@nikhedonia
nikhedonia / contracts.cpp
Created November 10, 2015 21:14
buggy...
#include <iostream>
#include <array>
#include <tuple>
#include <type_traits>
#include <algorithm>
using namespace std;
auto Valid = [](auto...x) -> integral_constant<bool,1> {};
#include <type_traits>
#include <iostream>
using namespace std;
auto Valid = [](auto...x) -> integral_constant<bool,1> {};
template<class F,class...X>
constexpr auto is_callable(F f,X...x)
-> decltype( f(x...), true_type{} ) {
return{};
@nikhedonia
nikhedonia / example.cpp
Last active October 24, 2015 19:16
Opaque Functional MatrixType
#include <iostream>
using namespace std;
template<class Getter>
struct VectorF {
const size_t N;
Getter Get;
template<class T>
@nikhedonia
nikhedonia / ES7SQL.js
Last active August 29, 2015 14:27
ES7SQL
function extend(...args) {
let obj = this||{};
const l = args.length;
for (let i=0; i < l; i++) {
for (let k in args[i]) {
obj[k] = args[i][k];
}
}
return obj;
}
@nikhedonia
nikhedonia / async_generator.js
Created June 25, 2015 23:26
async_generator example
var Promise = require('promise');
function* counter(){
let i=0;
while(1){
yield i++;
}
}
function wait(time){