Skip to content

Instantly share code, notes, and snippets.

View arthurafarias's full-sized avatar

Arthur de Araújo Farias arthurafarias

  • Campina Grande, Brasil
View GitHub Profile
@arthurafarias
arthurafarias / fifo.c
Created October 24, 2016 17:58
A simple fifo demostration written in C
/* To compile this code just type in terminal
* gcc fifo.c -o fifo
* ./fifo
*/
#include <stdio.h>
#include <stdlib.h>
char fifo[256];
int fifo_tail;
clear; clc;
fs = 8000;
ws = 2*pi*fs;
fc = 600;
wc = 2*pi*fc;
N = 29;
T = 1/fs;
syms n_;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arthurafarias
arthurafarias / _service.md
Last active April 24, 2016 04:13 — forked from naholyr/_service.md
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
#!/bin/bash
curl https://cdn.rawgit.com/arthurafarias/a88aa1c2dc075b32284549316e5a0a74/raw/3845e63a77486240d68da62afa744d5127b34540/.texlipse > .texlipse
curl https://cdn.rawgit.com/arthurafarias/ea7d426d13012f12701766d07b6fc34a/raw/959b0331b9375e2d0a6f47a05275369cebaff0e8/.project > .project
while [ -z $PRJ_NAME ]
do
echo "Type project name: ";
read PRJ_NAME
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>template-project</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>net.sourceforge.texlipse.builder.TexlipseBuilder</name>
<arguments>
#TeXlipse project settings
#Thu Apr 14 01:17:25 BRT 2016
markTmpDer=true
builderNum=7
outputDir=Build
makeIndSty=
bibrefDir=
outputFormat=pdf
tempDir=Tmp
mainTexFile=Document.tex
#!/bin/bash
eclipse_executable_path=$(realpath ./eclipse)
update-alternatives --install "/usr/local/bin/eclipse" eclipse "$eclipse_executable_path" 0
desktop_entry="/usr/share/applications/eclipse.desktop"
if [ -f $desktop_entry ]
then
@arthurafarias
arthurafarias / ufcg-ee-ie-p20151-p1e.md
Last active April 11, 2016 06:22
UFCG - Engenharia Elétrica - Instalações Elétricas - Período 2015.1 - Prova - 1º Estágio

Questão 01

  1. Uma edificação individual é aquela reconhecida pelos poderes públicos, podendo constituir-se de uma única ou de várias unidades consumidoras (NDU001 Item 3.10).

  2. Uma edificação agrupada constitui-se de um conjunto de edificações reconhecida pelos poderes públicos, constituída por duas ou mais unidades consumidoras construídas em um único terreno ou em terrenos

@arthurafarias
arthurafarias / ucg-ee-lca-e03p02.mdl
Created April 7, 2016 19:33
Laboratório de Controle Analógico Experimento 03 Parte 02 (Código Simulink)
Model {
Name "PID"
Version 7.3
MdlSubVersion 0
GraphicalInterface {
NumRootInports 0
NumRootOutports 0
ParameterArgumentNames ""
ComputedModelVersion "1.2"
NumModelReferences 0