Skip to content

Instantly share code, notes, and snippets.

View alexandre's full-sized avatar
🎯
Focusing

Alexandre Souza alexandre

🎯
Focusing
View GitHub Profile
@alexandre
alexandre / octacatSickerGcode
Last active December 26, 2015 10:39
Arquivo Gcode para corte de adesivo do octa_cat... Inkscape para o .svg e pycam para gerar o gcode... O adesivo será recortado na Vinyl_Cutter do Garoa Hacker Clube - https://garoa.net.br/wiki/Vinyl_Cutter
;PYCAM-META-DATA: Timestamp: 2013-10-24 11:42:36.513000
;PYCAM-META-DATA: Version: 0.5.1.1
;Estimated machine time: 4 minutes
G40 (disable tool radius compensation)
G49 (disable tool length compensation)
@alexandre
alexandre / stormtrooper
Created October 24, 2013 19:39
Simbolo stormtrooper para sticker. G code para uso na Vinyl Cutter do Garoa Hacker Clube o/
;PYCAM-META-DATA: Timestamp: 2013-10-24 17:37:27.280000
;PYCAM-META-DATA: Version: 0.5.1.1
;Estimated machine time: 14 minutes
G40 (disable tool radius compensation)
G49 (disable tool length compensation)
@alexandre
alexandre / gist:8459107
Last active January 3, 2016 11:49
Função para retornar músicas disponiveis em um music stream...
#retorna para a pagina com as musicas disponiveis
@app.route('/musics/')
def avaliable_songs():
#home dev
#file_path = "${HOME}/Workspace/flask/musicstream/app/static/uploads"
#
file_path = "%HOME%\\Dropbox\\GitHub\\musicstream\\app\static\\uploads"
file_list = list()
for (path, dirs, file) in os.walk(file_path):
file_list += file
@alexandre
alexandre / gist:8459226
Created January 16, 2014 17:21
página html que exibe lista de músicas disponíveis e opção de ouvi-las.... Obs.: Usando Flask e templates...
{% extends 'layout.html' %}
{% block content %}
<h2>Avaliable Songs</h2>
<div class="avaliable-songs">
<audio class="audio" controls preload="auto">
<!-- ao selecionar uma música, é setado a variavel filename-->
<source src="/static/uploads/{{ filename }}" type="audio/mpeg"
id="filename" name="filename">
<span>Your browser does not support the audio element.</span>
</audio><hr/>
@alexandre
alexandre / gist:9275442
Created February 28, 2014 17:26
teste para alguém do twitter
<html>
<body>
<script language="javascript" type="text/javascript">
<!--
function foo() {
if (5 > 3 ) {
alert("Let's go down the first road!");
}
else
{ console.log("fudeo"); }
@alexandre
alexandre / vimrc
Created March 1, 2014 02:27 — forked from yann2192/vimrc
set shell=/bin/bash
if $TERM == "xterm"
set t_Co=256 " 256 colors
endif
set nocompatible " be iMproved
let mapleader="," " change the leader to be a comma vs slash
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()

Steps to upgrade vim in arch linux for python runtime support

Python support is needed by vim in order to run things like Conque and Slimv. Arch keeps vim slim by only providing Python support in gvim. But you may prefer vim to gvim, so here's what's needed.

More ABS info.

# Install and run abs (sync)

sudo pacman -S abs

@alexandre
alexandre / gist:9668492
Created March 20, 2014 16:53
Tipo Abstrato de Dado (TAD) aplicado com frações... 4fun
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
/*
TAD = Tipo de Dado Abstrato
Representa uma fracao
*/
typedef struct _frac
{
@alexandre
alexandre / cifras_C
Created March 20, 2014 16:55
brincando com cifras em C
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
void limpar()
{
system ("clear || cls");
}
@alexandre
alexandre / cifra-cesar-c
Created March 20, 2014 16:57
Cifra de César em C
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*Colaboracao Henry-Keys: Port do header conio.h para Linux =)*/
#include <ctype.h>
#ifdef WIN32
#include <conio.h>