Skip to content

Instantly share code, notes, and snippets.

View yudi-matsuzake's full-sized avatar

Yudi Matsuzake yudi-matsuzake

  • Curitiba, Paraná, Brasil
View GitHub Profile
@yudi-matsuzake
yudi-matsuzake / knowledge_log.md
Last active August 29, 2015 14:12
Log informal de algumas coisas - ao meu ver - interessantes.

Bibliotecas necessárias para o Spotify rodar músicas locais

  • libx264-123

  • ffmpeg

Alterando as metatags de um mp3 com ffmpeg

ffmpeg32 -i out.mp3 -metadata title="The Title You Want" -metadata artist="" -metadata album="Name of the Album" out2.mp3
@yudi-matsuzake
yudi-matsuzake / fu.sh
Created June 15, 2015 18:05
./fu.sh arquivo frase 1000
#!/bin/bash
if [ "$#" -ne 3 ]
then
exit
fi
echo "arquivo: $1"
echo "tamanho: $3"
echo "frase: \"$2\""
*.aux
*.glo
*.idx
*.log
*.toc
*.ist
*.acn
*.acr
*.alg
*.bbl
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>
#define N 100000
#define N_ITER 10
#define long_int unsigned long long int
long_int randf(long_int a){
@yudi-matsuzake
yudi-matsuzake / afim.c
Created October 22, 2015 21:56
cifra afim
#include <stdio.h>
#include <string.h>
#define USAGE "USAGE: %s <cifra|decifra> [arquivo_entrada.txt]\n"
#define BUFFER_SIZE 2048
#define CMD_CIFRA "cifra"
#define CMD_DECIFRA "decifra"
#define N_ALF 26
@yudi-matsuzake
yudi-matsuzake / naive-hash.c
Created November 4, 2015 01:33
Hash bobo do exercicício 4 da aula-21
#include <stdio.h>
#define BUFFER_SIZE 4098
#define ERROR_MSG "Não pôde abrir o arquivo %s.\n"
#define USAGE_MSG "USAGE: %s <file> [file ...]\n"
unsigned char naive_hash(char* filename){
FILE* file = fopen(filename, "r");
if(!file){
#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace std;
using namespace cv;
#define WINDOW_TITLE "Modular Fractal"
#define IMG_WSIZE 750
#define IMG_HSIZE 750
@yudi-matsuzake
yudi-matsuzake / rapid.cpp
Created November 27, 2015 10:20
Pequeno exemplo da utilização do RapidXML
#include <iostream>
#include <fstream>
#include <sstream>
#include <rapidxml/rapidxml.hpp>
#include <rapidxml/rapidxml_utils.hpp>
void bufferize(char* file_name, char*& buffer, size_t& size){
//tamanho
FILE* file = fopen(file_name, "r");
fseek(file, 0L, SEEK_END);
#include <stdio.h>
int main(){
unsigned long long int n[38];
n[0] = 0xa330a320a310a30;
n[1] = 0xa370a360a350a34;
n[2] = 0x310a30310a390a38;
n[3] = 0xa33310a32310a31;
#include <iostream>
typedef struct _{
_& operator()(void){
static int n = 0;
std::cout << n << std::endl;
n++;
return *this;
}
}_;