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
#!/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
#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
<?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>
#!/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
@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)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
clear; clc;
fs = 8000;
ws = 2*pi*fs;
fc = 600;
wc = 2*pi*fc;
N = 29;
T = 1/fs;
syms n_;
@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;
@arthurafarias
arthurafarias / exp01.mdl
Created November 7, 2016 12:15
ufcg-ee-cem-exp01
Model {
Name "simulacao"
Version 7.7
MdlSubVersion 0
GraphicalInterface {
NumRootInports 0
NumRootOutports 0
ParameterArgumentNames ""
ComputedModelVersion "1.1"
NumModelReferences 0
@arthurafarias
arthurafarias / Client.py
Created December 2, 2016 00:34
UDP Simple Client and Threaded Server written in Python
import socket
import sys
HOST, PORT = "localhost", 8888
data = " ".join(sys.argv[1:])
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.sendto(data + "\n", (HOST, PORT))
received = sock.recv(1024)