Skip to content

Instantly share code, notes, and snippets.

View seujorgenochurras's full-sized avatar

Jorge Seu Churrasco com seujorgenochurras

  • rua dos bobos nº 0
View GitHub Profile
@seujorgenochurras
seujorgenochurras / .gitignore
Created May 1, 2023 18:44
my custom gitignore
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
/src/main/resources/application.properties
### STS ###
.apt_generated
.classpath
.factorypath
@seujorgenochurras
seujorgenochurras / Main.java
Created May 19, 2023 22:11
prime generator
public class Main {
public static void main(String[] args){
long startedAt = System.nanoTime();
HashSet<Long> primes = new HashSet<>();
primes.add(2L);
for(long i = 1; i < 10000000; i+= 2) {
boolean isPrime = true;
for (int j = 3; j < Math.sqrt(i); j++) {
@seujorgenochurras
seujorgenochurras / killBloatware.sh
Last active January 25, 2024 20:52
Kills useless services that might be using your useful RAM
#!/usr/bin/env zsh
#WARNING THIS MIGHT BREAK SOMETHING OR CORRUPT FILES
#I HAVEN'T DONE RESEARCH ON ANY OF THOSE APPS, SO I'M NOT EVEN SURE WHAT THEY DO
bloatwareNames="package|io.elementary|mysqld|djs|nautilus|evolution|tracker|execsn|ibus|hidpi|\(sd-|cups|flatpak-por|dotnet"
bloatwareIds=$(ps -TA | grep -Po "[0-9]{3,} (?=(\?|p).*(?=($bloatwareNames)))" | tr -d '\n')
sudo kill $(echo $bloatwareIds)
@seujorgenochurras
seujorgenochurras / .zshrc
Created January 27, 2024 16:30
my zshrc with all the custom random shit I've put in it
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
. "$HOME/.asdf/asdf.sh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME