Skip to content

Instantly share code, notes, and snippets.

View maksadbek's full-sized avatar
💭
Chilling

Maksadbek maksadbek

💭
Chilling
View GitHub Profile
// ConsoleApplication2.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <string>
#include <iostream>
using std::string;
using std::cout;
using std::endl;
create table if not exists audit(
id serial,
hi varchar
);
create table if not exists trigger_tbl(
id serial,
log_text varchar
);
package main
import (
"fmt"
"reflect"
)
type Foo struct {
FirstName string `tag_name:"tag 1"`
LastName string `tag_name:"tag 2"`
@maksadbek
maksadbek / Kruskal_MST.cpp
Created November 4, 2015 08:52 — forked from calmhandtitan/Kruskal_MST.cpp
C++ implementation of Kruskal's Algorithm for finding the MST using Union-Find Data Structure
//Kruskal using Union_Find
#include "stdio.h"
#include "string.h"
#include "vector"
#include "algorithm"
using namespace std;
#define pii pair<int, int>
#define pip pair<int, pii>
#define F first
@maksadbek
maksadbek / springer-free-maths-books.md
Created December 28, 2015 20:20 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of maths books available for free, here are the direct links
@maksadbek
maksadbek / rmongodb-tutorial.md
Created February 24, 2016 15:03 — forked from Btibert3/rmongodb-tutorial.md
Basic Overview of using the rmongodb package for R.

rmongodb Tutorial

This is a quick document aimed at highlighting the basics of what you might want to do using MongoDB and R. I am coming at this, almost completely, from a SQL mindset.

Install

The easiest way to install, I believe, is

package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)
@maksadbek
maksadbek / badmail.Rmd
Created March 3, 2016 14:28 — forked from hrbrmstr/badmail.Rmd
Code for this post:
---
title: "Visualizing the Clinton Email Network in R"
author: "hrbrmstr"
date: "`r Sys.Date()`"
output: html_document
---
```{r include=FALSE}
knitr::opts_chunk$set(
collapse=TRUE,
comment="#>",
@maksadbek
maksadbek / slim-redux.js
Created March 7, 2016 16:41 — forked from gaearon/slim-redux.js
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
}
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {
@maksadbek
maksadbek / mgoExample.go
Created March 15, 2016 17:20 — forked from border/mgoExample.go
mgo example
package main
import (
"fmt"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"time"
)
type Person struct {