This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script for setup an 8BitDo controller as Xbox controller using xboxdrv. | |
if [ $UID != 0 ]; then | |
echo "You should run as root!" >&2 | |
exit 1 | |
fi | |
device_id="${1-2dc8:3106}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
def main(): | |
""" | |
Demonstração de que dado uma P.A. com razão constante, existe uma proporção | |
entre a diferença entre os índices de 2 termos quaisquer e a diferença de | |
seus valores. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script migrated to repository: https://github.com/freedev-org/dalias | |
CONFIG_DIR=~/.dalias | |
CONFIG_FILE="$CONFIG_DIR/config" | |
ALIAS_DIR="$CONFIG_DIR/bin" | |
DOCKER_CMD='docker run -it --rm -v $(pwd):/host -w /host' | |
BGDOCKER_CMD='docker run -id --rm -v $(pwd):/host -w /host' | |
DEFAULT_VALUE="bitnami/minideb:latest bash" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gcc countlines.c -O2 -o countlines | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <emmintrin.h> | |
#define BLOCK_SIZE 4096 * 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if ! which yad >/dev/null; then | |
echo "The 'yad' is required to run this script. Try:" >&2 | |
echo " sudo apt install yad" >&2 | |
exit 1 | |
fi | |
CONFIG_FILE=~/.chorts | |
LOG_FILE=~/.chorts.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import inspect | |
class Pipe: | |
""" | |
Create a wrapper to pipe function calls with the given value. | |
The functions could be: value's method, builtin or any | |
function in the current module. | |
Examples: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# By Luiz Felipe Silva (https://github.com/Silva97) | |
## References ## | |
# sys_rt_sigreturn: https://elixir.bootlin.com/linux/latest/source/arch/x86/um/signal.c#L560 | |
# sigframe: https://elixir.bootlin.com/linux/latest/source/arch/x86/include/asm/sigframe.h | |
# ucontext: https://elixir.bootlin.com/linux/latest/source/include/uapi/asm-generic/ucontext.h | |
# sigcontext: https://elixir.bootlin.com/linux/latest/source/arch/x86/include/uapi/asm/sigcontext.h#L324 | |
import struct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include "target.h" | |
OS_LINUX(char *os, void) | |
{ | |
return "Linux"; | |
} | |
OS_WINDOWS(char *os, void) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#define CATCH(name) \ | |
if (0) \ | |
_catch_##name: | |
#define FAIL(name) goto _catch_##name | |
#define FAIL_IF(expr, name) \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Example by Luiz Felipe (Silva97) | |
* | |
* It's just an example. Don't consider it a final code and DON'T write | |
* all your code on a unique module, please. | |
* | |
* Tip: Use a struct to manipulate translate units instead of use only a | |
* FILE pointer ;) | |
*/ |
NewerOlder