Skip to content

Instantly share code, notes, and snippets.

View guinetik's full-sized avatar

guinetik guinetik

View GitHub Profile
# Automação Desktop - Versão Ultra Compatível
# Funciona mesmo sem .NET Framework completo
param(
[string]$AppName,
[int]$TestDuration = 60
)
Write-Host "🚀 === AUTOMAÇÃO DESKTOP ULTRA COMPATÍVEL ===" -ForegroundColor Cyan
Write-Host "💡 Esta versão usa apenas recursos nativos do Windows" -ForegroundColor Yellow
Write-Host ""
# Script de Automação Desktop - Versão Simplificada e Funcional
param(
[string]$AppName,
[int]$TestDuration = 60
)
# Inicialização dos assemblies necessários
Write-Host "🔄 Inicializando componentes..." -ForegroundColor Cyan
try {
@guinetik
guinetik / clone.ps1
Last active September 23, 2025 07:27
clone stuff with PAT
<#
.SYNOPSIS
Clona repositórios do GitHub baseado em critérios de pesquisa usando um Personal Access Token (PAT).
.DESCRIPTION
Este script utiliza a API do GitHub para buscar repositórios que correspondem aos critérios especificados
e os clona localmente. Por padrão, força a busca apenas por repositórios privados, mas pode ser
customizado através do parâmetro Query.
.PARAMETER Pat
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
@guinetik
guinetik / job.xml
Created April 5, 2018 17:51
FlatFileItemReader
<bean id="itemReader" class="org.springframework.batch.item.file.FlatFileItemReader" scope="step">
<property name="resource" value="file.csv" />
<property name="lineMapper">
<bean class="org.springframework.batch.item.file.mapping.PassThroughLineMapper" />
</property>
<property name="strict" value="true" />
</bean>
import java.util.ArrayList;
public class HelloWorld{
private int max;
private ArrayList<String> lista;
public static int MAX = 10;
public HelloWorld(int max) throws Exception {
if(max > 0 && max < MAX) {
this.max = max;
@guinetik
guinetik / RecordActivity.java
Created July 21, 2013 21:58
create video file
videoFile = new File(Environment.getExternalStorageDirectory().getPath() + "/Recorder/video.mp4");
if (!videoFile.exists()) {
try {
videoFile.createNewFile();
Log.i(LOG_TAG, "create videoFile success");
} catch (Exception e) {
Log.e(LOG_TAG, "create videoFile failed");
}
} else {
@guinetik
guinetik / RecordActivity.java
Created July 21, 2013 21:54
ffmpeg record audio
while (isAudioRecording) {
bufferReadResult = audioRecord.read(audioData, 0, audioData.length);
if (bufferReadResult == 1024 && isRecorderStart) {
Buffer[] realAudioData1024 = new Buffer[bufferReadResult];
System.arraycopy(audioData, 0, realAudioData1024, 0, bufferReadResult);
recorder.record(yuvIplimage);
recorder.record(realAudioData1024);
Log.d(LOG_TAG, "recorder.record(): bufferReadResult == 1024");