Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Cosmin Popescu cosminpopescu14

🎯
Focusing
View GitHub Profile
View build_native_image
native-image --no-server -jar demo-native-0.0.1-SNAPSHOT.jar -H:IncludeResources=E:\Projects\demo-native\target\classes\META-INF\native-image\org.springframework.aot\spring-aot\native-image.properties -H:ReflectionConfigurationFiles=E:\Projects\demo-native\target\classes\META-INF\native-image\org.springframework.aot\spring-aot\reflect-config.json -H:DynamicProxyConfigurationFiles=E:\Projects\demo-native\target\classes\META-INF\native-image\org.springframework.aot\spring-aot\proxy-config.json -H:+ReportExceptionStackTraces -cp demo-native-0.0.1-SNAPSHOT.jar -H:-AllowVMInspection --allow-incomplete-classpath
View fix_usb_stick
cosmin@pop-os:~$ sudo fdisk /dev/sda
Welcome to fdisk (util-linux 2.36).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xfd679ce9.
Command (m for help): m
@cosminpopescu14
cosminpopescu14 / hide_pie_series_.html
Last active Mar 4, 2021
Hide all series form a pie chart from chartjs
View hide_pie_series_.html
<!DOCTYPE html>
<html lang="en">
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.min.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.min.js"
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
crossorigin="anonymous"></script>
View mvn_build_4_cores
D:\Proiecte\Java\code-with-quarkus-profanity\code-with-quarkus-profanity>mvn -T 4 clean install
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.acme:code-with-quarkus-profanity:jar:1.0.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-compi
ler-plugin @ line 105, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
View advent_of_code_day1.java
package com.company;
import java.util.*;
public class Bani {
public static void main(String[] args) {
var input = List.of(1891,
1975,
1987,
View apache_reverse_proxy_config
<VirtualHost *:8081>
ProxyPreserveHost On
ErrorLog ${APACHE_LOG_DIR}/error_quarkus.log
CustomLog ${APACHE_LOG_DIR}/access_quarkus.log combined
# Servers to proxy the connection, or;
# List of application servers:
# Usage:
# ProxyPass / http://[IP Addr.]:[port]/
# ProxyPassReverse / http://[IP Addr.]:[port]/
View rsa.java
package com.company;
import java.math.BigInteger;
import java.security.SecureRandom;
public class RSA {
private final static BigInteger one = new BigInteger("1");
private final static SecureRandom random = new SecureRandom();
View GetRandom.cs
using System;
using System.Linq;
namespace Craaash
{
class Program
{
static void Main(string[] args)
{
View FunctionalFizzBuzz.java
package com.company;
import java.util.stream.IntStream;
public class FizzBuzz {
public static void main(String[] args) {
IntStream.range(1, 100)
.mapToObj( x -> x % 15 == 0 ? "FizzBuzz" : x % 5 == 0 ? "Buzz" : x % 3 == 0 ? "Fizz" : x)
.forEach(System.out::println);
View java_home_management.py
# This is a sample Python script.
# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
import os
import argparse
def get_args():
# Create the parser