Skip to content

Instantly share code, notes, and snippets.

View rendon's full-sized avatar
🧑‍🔬
Trying new things out.

Rafael Rendón rendon

🧑‍🔬
Trying new things out.
View GitHub Profile
@rendon
rendon / vim_7.4_compilation
Last active August 29, 2015 13:56
Instructions to compile Vim 7.4 in Debian with GUI support.
#!/bin/bash
./configure --with-x --with-features=huge --enable-rubyinterp \
--enable-pythoninterp --with-python-config-dir=/usr/lib/python2.7/config \
--enable-gui=gtk2 --enable-cscope --prefix=/usr --enable-gtk2-check
make VIMRUNTIMEDIR=/usr/share/vim/vim74
sudo make install
#Set vim as your default editor with update-alternatives.
@rendon
rendon / str.sh
Created May 23, 2014 02:02
Single Test Runner
#!/bin/bash
if [ -z $1 ]
then
echo "USAGE: $0 <test file without extension>";
echo "EXAMPLE: $0 TestQuickSort";
exit 1;
fi
cat > .build <<EOF
@rendon
rendon / prefixes_and_suffixes.cpp
Created June 4, 2014 03:12
Codeforces #246 Div 2 D: Prefixes and Suffixes
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
using namespace std;
const int MAX = 100005;
char S[MAX];
int Z[MAX];
@rendon
rendon / substring_frequency.cpp
Created June 4, 2014 03:24
Light OJ: 1255 - Substring Frequency
//region Template
#include <bits/stdc++.h>
//#define ONLINE_JUDGE
using namespace std;
//ios_base::sync_with_stdio(false);
inline int log(const char* format, ...)
{
#ifndef ONLINE_JUDGE
va_list args;
va_start(args, format);
@rendon
rendon / substring_frequence_ii.cpp
Last active August 2, 2017 17:31
Light OJ: 1427 - Substring Frequency (II)
/* Copyright 2017 Rafael Rendón Pablo <rafaelrendonpablo@gmail.com> */
// region Template
#include <bits/stdc++.h>
using namespace std;
typedef long long int64;
typedef unsigned long long uint64;
const double kEps = 10e-8;
const int kMax = 1000;
const int kInf = 1 << 30;
const int kFail = -1;
@rendon
rendon / tachibana_kanades_tofu.cpp
Created June 4, 2014 04:48
Codeforces #248 Div 2 E. Tachibana Kanade's Tofu
//region Template
#include <bits/stdc++.h>
//#define ONLINE_JUDGE
using namespace std;
//ios_base::sync_with_stdio(false);
inline int log(const char* format, ...)
{
#ifndef ONLINE_JUDGE
va_list args;
va_start(args, format);
@rendon
rendon / gist:7f2aaab4c395e2cb6e6b
Created August 12, 2014 02:48
Omegaup service.log
2014-07-31 18:55:07,561 [main] INFO omegaup.Logging - Logger loaded for /var/log/omegaup/service.log
2014-07-31 18:55:07,605 [main] INFO org.eclipse.jetty.util.log - Logging initialized @758ms
2014-07-31 18:55:07,690 [main] INFO org.eclipse.jetty.server.Server - jetty-9.1.z-SNAPSHOT
2014-07-31 18:55:07,741 [main] INFO o.e.jetty.server.ServerConnector - Started ServerConnector@4f106738{HTTP/1.1}{0.0.0.0:39613}
2014-07-31 18:55:07,741 [main] INFO org.eclipse.jetty.server.Server - Started @900ms
2014-07-31 18:55:07,742 [main] INFO omegaup.broadcaster.Broadcaster - Registering port 39613
2014-07-31 18:55:07,742 [main] INFO omegaup.broadcaster.Broadcaster - Broadcaster started
2014-07-31 18:55:10,444 [main] INFO omegaup.grader.RoutingDescription - Parsing routing table:
2014-07-31 18:55:10,536 [main] INFO omegaup.grader.RoutingDescription - Routing rule parsed: List()
2014-07-31 18:55:10,566 [main] INFO omegaup.grader.RoutingDescription - Parsing routing table:
@rendon
rendon / huffman_coding.cpp
Last active June 9, 2017 14:06
Huffman coding algorithm.
#include <iostream>
#include <fstream>
#include <queue>
#include <map>
#include <vector>
#include <cstring>
#include <algorithm>
using namespace std;
struct Node {
@rendon
rendon / gist:89395aabf7e980b4ff7d
Created January 3, 2015 05:26
omegaup-3e-log
PHPUnit 3.7.28 by Sebastian Bergmann.
Configuration read from /opt/omegaup/frontend/tests/phpunit.xml
............................................................... 63 / 180 ( 35%)
.....................................................EE........ 126 / 180 ( 70%)
.....................................................E
Time: 1.9 minutes, Memory: 58.65Mb
@rendon
rendon / glock_instructions.md
Last active August 29, 2015 14:25
How to use Glock

How to use Glock in Hypertask

  1. Set $GOPATH to the Hypertask directory.
  2. Install with glock install hypertask/api
  3. Synchronize with glock sync hypertask/api

Easy...!