Skip to content

Instantly share code, notes, and snippets.

View theosirian's full-sized avatar

Tiago Nascimento theosirian

View GitHub Profile
@theosirian
theosirian / makefile-setup.sh
Last active July 7, 2017 18:37
Script para criar um ambiente para a Atividade Tutorial de Makefile
#! /bin/bash
mkdir -p ativ-tutorial/
cd ativ-tutorial/
echo \
'#include <stdlib.h>
#include <stdio.h>
#include "util.h"
#include "cpu.h"
sudo apt-get update
sudo apt-get install -y mongodb
rm -rf ~/workspace
rm -rf ~/data
mkdir ~/workspace
cd ~/workspace
wget "https://drive.google.com/uc?export=download&id=0B2kxVreQtp4mdk1tT2dwWW5FY2s" -O code.zip
unzip code.zip
@theosirian
theosirian / p1e4.c
Created September 23, 2014 22:01
exercicio 4 da prova
#include <stdio.h>
#include <stdlib.h>
int remRep(int vec[], int size){
int i, k, m;
for (i = 1; i < size; i++){
for (k = i; k > 0; k--){
if(vec[k] < vec[k-1]){
int aux = vec[k];
vec[k] = vec[k-1];
var express = require("express");
var logfmt = require("logfmt");
var app = express();
app.use(logfmt.requestLogger());
app.get('/', function(req, res) {
res.send('Hello World!');
});