Skip to content

Instantly share code, notes, and snippets.

View fabriciofx's full-sized avatar
🎯
Focusing

Fabricio Cabral fabriciofx

🎯
Focusing
  • Brazil
View GitHub Profile
@fabriciofx
fabriciofx / sine_bench.c
Created September 13, 2021 21:55 — forked from mrbid/sine_bench.c
A benchmark of different trigonometric sine functions.
/*
James William Fletcher (james@voxdsp.com)
August 2021
Benchmarking sine wave functions.
references:
http://www.ee.ic.ac.uk/pcheung/teaching/ee3_Study_Project/Sinewave%20Generation(708).pdf
https://demonstrations.wolfram.com/SineWaveGenerationUsingAnUnstableIIRFilter/
https://en.wikipedia.org/wiki/Goertzel_algorithm
@fabriciofx
fabriciofx / readme.md
Created April 10, 2021 03:59 — forked from psiborg/readme.md
Apple Magic Mouse and Windows 10 #windows
  1. Download the latest version of the "Boot Camp Support Software" (e.g., 5.1.5722) from https://support.apple.com/downloads/bootcamp
  2. Unzip the file (e.g., bootcamp5.1.5722.zip) to a new directory
  3. Run BootCamp\Drivers\Apple\AppleWirelessMouse64.exe
  4. Turn on Bluetooth and pair your Magic Mouse

Note: Apple wireless mouse devices have a built-in passcode of "0000" (four zeros).

@fabriciofx
fabriciofx / Apple-Magic-Mouse-Windows-10-Drivers.txt
Created April 10, 2021 03:00 — forked from esters/Apple-Magic-Mouse-Windows-10-Drivers.txt
Apple Magic Mouse (A1296) - Windows 10 x64 Drivers
1. Download Brigadier - https://github.com/timsutton/brigadier/releases
2. Extract and run Brigadier (via CMD) with the following flags - brigadier.exe -m Macmini8,1
3. Brigadier will download and extract the bootcamp drivers for Mac Mini (2018)
4. Navigate - BootCamp-091-87418\BootCamp\Drivers\Apple\AppleWirelessMouse
5. Right click on AppleWirelessMouse.inf - Install.

There are 3 plugins for generating to create a JAR-File in maven:

  • maven-jar-plugin
  • maven-assembly-plugin
  • maven-shade-plugin

maven-jar-plugin:This plugin provides the capability to build and sign jars.But it just compiles the java files under src/main/java and /src/main/resources/.It doesn't include the dependencies JAR files.

<!--exclude all xml files from the jar-->
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
@fabriciofx
fabriciofx / coroutine.c
Created May 27, 2020 00:43 — forked from rlcamp/coroutine.c
Coroutines for generator functions, sequential pipelines, state machines, and other uses in C
/*
Copyright 2015-2020 Richard Campbell
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Coroutines for generator functions, sequential pipelines, state machines, and other uses in C
Significant conceptual contribution by Rich Felker and others
@fabriciofx
fabriciofx / bytecode.patch
Created May 7, 2020 22:59 — forked from Theldus/bytecode.patch
Makes javap more objdump-like =), enjoy
# Victorique de Blois byte patch v3.0 =), by Theldus
#
# This patch edits the javap source code so that when using the '-c' option, in
# addition to the instruction, the bytes related to it are also emmited, something
# similar to what objdump does. An example of output follows below:
#
# Compiled from "hello.java" (Victorique de Blois, byte dump patch v3.0 by Theldus)
# public class hello {
# public hello();
# Code:
@fabriciofx
fabriciofx / irc.md
Created April 27, 2020 13:45 — forked from xero/irc.md
irc cheat sheet

#IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

##The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
    • Leaves the specified channel.
@fabriciofx
fabriciofx / data_alignment.c
Created April 15, 2020 03:50 — forked from koyedele/data_alignment.c
A simple program that shows the effect of word alignment on the performance of programs.
/**
* File: data_alignment.c
* This is a collection of simple functions that attempt to read
* from a 5MB file in varying sizes and with different buffer
* alignments.
*
* The munge* functions are derived from Jonathan Rentzsch's article
* https://www.ibm.com/developerworks/library/pa-dalign/
*
* This work is inspired by the same article referenced above.
@fabriciofx
fabriciofx / win10colors.cmd
Created April 1, 2020 00:11 — forked from mlocati/win10colors.cmd
ANSI Colors in standard Windows 10 shell
@echo off
setlocal
call :setESC
cls
echo %ESC%[101;93m STYLES %ESC%[0m
echo ^<ESC^>[0m %ESC%[0mReset%ESC%[0m
echo ^<ESC^>[1m %ESC%[1mBold%ESC%[0m
echo ^<ESC^>[4m %ESC%[4mUnderline%ESC%[0m
@fabriciofx
fabriciofx / main.c
Created April 1, 2020 00:10 — forked from mlocati/main.c
Enable/disable/check color support for Windows (ENABLE_VIRTUAL_TERMINAL_PROCESSING flag)
#define _WIN32_WINNT 0x0600
#include <stdio.h>
#include <windows.h>
#include <fileapi.h>
#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING
#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
#endif