Skip to content

Instantly share code, notes, and snippets.

View palcu's full-sized avatar
🚒
Responding to a pager alert

Alex Palcuie palcu

🚒
Responding to a pager alert
View GitHub Profile
@palcu
palcu / about.md
Created September 12, 2011 15:04 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <cstdio>
#include <queue>
using namespace std;
struct Vaca{
int x,y;
char ceva[20];
float alte_balarii;
@palcu
palcu / instructiuni.md
Created September 1, 2012 14:58
Manual pentru Wordpress - Alex Palcuie

Pentru editori

  • Cum să modifici titlul website-ului ?
  • Cum să editezi un articol și să: ** adaugi o fotografie ** un document
  • Cum editez bara de meniuri?

Pentru dezvoltatori

  • Setări UNIX
  • Setări DNS
@palcu
palcu / problema.cpp
Created October 11, 2012 19:43
Problema
#include <fstream>
#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
bool compara(const char x,const char y)
{
return (strcmp(&x,&y)<1);
}
/***************************************************
* Alex Palcuie
* Romania - 2013
* alex [dot] palcuie [at] gmail [dot] com
* http://palcu.blogspot.com/
****************************************************/
#include <vector>
#include <list>
#include <map>
@palcu
palcu / setup.sh
Last active December 25, 2015 16:49
Setup for a new machine
if [[ `uname` == 'Linux' ]]; then
add-apt-repository -y ppa:fcwu-tw/ppa
apt-get update
apt-get -y install vim zsh ruby rubygems curl fasd most
elif [[ `uname` == 'Darwin' ]]; then
brew install fasd zsh vim curl most
fi
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
ERROR: role "mptracker" already exists
createdb: database creation failed: ERROR: database "mptracker" already exists
NOTICE: extension "uuid-ossp" already exists, skipping
CREATE EXTENSION
/tmp/vagrant-shell: line 41: /root/py33env/bin/pip: No such file or directory
#!/bin/bash
POSTGRES_KEY_URL='http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc'
POSTGRES_REPO='deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main'
VIRTUALENV_PY='https://raw.github.com/pypa/virtualenv/develop/virtualenv.py'
SETUPTOOLS_URL='https://pypi.python.org/packages/source/s/setuptools/setuptools-1.1.6.tar.gz'
PIP_URL='https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz'
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
@palcu
palcu / first.py
Last active December 29, 2015 11:48
import math
f = open('input.in')
cases = int(f.readline())
for case in range(cases):
m = [ ]
lines = int(f.readline())
# read and convert the matrix