Skip to content

Instantly share code, notes, and snippets.

#include <vector>
#include <algorithm>
#include <iterator>
#include <iostream>
#include <sys/time.h>
void event(std::vector<char> &v, std::vector<unsigned long long> &sp, std::vector<unsigned long long> &ep)
{
char pre_val(0), cur_val(0);
unsigned long long pos(0);
@kireal
kireal / NoZeros
Last active August 29, 2015 14:19 — forked from shivallan/NoZeros
#include <vector>
#include <cstdlib>
#include <algorithm>
#include <iostream>
#include <sys/time.h> // for gettimeofday()
//#include <cstdint> C++11 Standart only
using namespace std;
void nozero (std::vector<long long> &v)
{
@kireal
kireal / MinMax
Last active August 29, 2015 14:19 — forked from shivallan/MinMax
#include <vector>
#include <cstdlib>
#include <algorithm>
#include <iostream>
#include <sys/time.h>
using namespace std;
std::pair<int, int> minimax (std::vector<long long> &v)
{
@kireal
kireal / Reverse
Last active August 29, 2015 14:19 — forked from shivallan/Reverse
#include <vector>
#include <algorithm>
#include <iostream>
#include <sys/time.h>
#include <cstdlib>
using namespace std;
int main()
{
- Tune /etc/ssh/sshd_config
UseDNS no # Disable DNS lookups
GSSAPIAuthentication no # Disable negotation of slow GSSAPI
don't forget to restart it, use a script provider to set it , or create it with veewee or snapshot it
- Tune Vagrantfile
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]