Skip to content

Instantly share code, notes, and snippets.

View TrevCan's full-sized avatar
🖖

Hector Canizales TrevCan

🖖
View GitHub Profile
@TrevCan
TrevCan / Pass-for-iOS.md
Created August 17, 2021 18:38
Guide to using the Password Store for iOS, with active synchronization between devices using git repos.

Guide to using Pass for iOS

*partly based on this wiki

@TrevCan
TrevCan / TypeClipboard.md
Last active October 22, 2023 11:47 — forked from ethack/TypeClipboard.md
type-clip: scripts that simulate typing the clipboard contents. Useful when pasting is not allowed.

It "types" the contents of the clipboard.

Why can't you just paste the contents you ask? Sometimes pasting just doesn't work.

  • One example is in system password fields on OSX.
  • Sometimes you're working in a VM and the clipboard isn't shared.
  • Other times you're working via Remote Desktop and again, the clipboard doesn't work in password boxes such as the system login prompts.
  • Connected via RDP and clipboard sharing is disabled and so is mounting of local drives. If the system doesn't have internet access there's no easy way to get things like payloads or Powershell scripts onto it... until now.

Windows

The Windows version is written in AutoHotKey and easily compiles to an executable. It's a single line script that maps Ctrl-Shift-V to type the clipboard.

@TrevCan
TrevCan / _vimrc
Last active February 9, 2021 01:47
@TrevCan's _vimrc config file
"ex vimrc stuff
source $VIMRUNTIME/vimrc_example.vim
" Vim-Plug Vim plugin manager
call plug#begin('$HOME/Vim/vim-plug')
" this path equals c:\users\{user}\Vim\vim-plug
" Vim-Plug declare list of plugins
@TrevCan
TrevCan / Fibonacci.java
Created November 19, 2020 01:17
fibonacci function using recursion.
package tecbot;
public class Fibonacci {
public static void main(String[] args) {
System.out.println(getFibonacci(3));
}
public static int getFibonacci(int n){
if(n > 1)
return getFibonacci(n-1)+getFibonacci(n-2);
return n;
@TrevCan
TrevCan / simulation_simulation.iml
Created October 28, 2020 00:12
AnimalsAndInterfaces
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
@TrevCan
TrevCan / Main.java
Last active October 22, 2020 22:47
Primo
public class Main {
public static void main(String[] args) {
// write your code here
//random int between 100 - 1000
int randomNumber = (int) (Math.random() * 900 + 100);
System.out.println(isPrime(1));
System.out.println(randomNumber);
for (int i = 1; i <= randomNumber; i++) {
char printChar = isPrime(i) ? '#' : '*';
if (i % 10 == 0 && i != 0)
public class IceCreamFactory {
//helado 5 estados:
/*
¬ sin hacer: 255(+35) ou 500 (+55)
¬ recipiente: cono(+5) ou vaso
¬ base 1: zarza, fresa, guanábana, maracuyá
¬ base 2: zarza, fresa, guanábana, maracuyá
¬ topping: chocolate(+5), mermelada
¬entrega
*/
@TrevCan
TrevCan / RobotFactory.java
Last active October 11, 2020 03:20
Generates an FRC Robot randomly and deteremines its probability.
public class RobotFactory {
/*
Construye un programa que de manera automática determine los componentes que un robot va a tener:
1. Chasis: butterfly, dragonfly, kiwi - 3
2. Intake: rollers, claw, pneumatic claw - 3
3. Climber: pneumatic climber, belts, brute force - 3
@TrevCan
TrevCan / Scratch.java
Last active October 1, 2020 19:18
swap 2 variables without temp variable.
class Scratch {
public static void main(String[] args) {
double a = -9, b = -11;
System.out.println("a: " + a + "\nb: " + b);
a = a * b;
b = a/b;
a = a/b;
@TrevCan
TrevCan / IntegralNumerica_src_numerical_integration_Main.java
Last active November 15, 2020 20:47
Numeric Integration with Trapezoidal Method
package numerical.integration;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class Main {
static double[][] function_data;
static double offset;
static final boolean IS_IN_DEBUG_MODE = false;