Skip to content

Instantly share code, notes, and snippets.

View caisback's full-sized avatar

caisback

View GitHub Profile
@caisback
caisback / NVM for easy Node.md
Created May 18, 2021 06:55
NVM for easy Node
  • Removing installed node & npm
    $ sudo apt-get remove nodejs
    $ sudo apt-get remove npm
    
  • How to install nvm?
    $ sudo apt install curl
    $ curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
    
@caisback
caisback / Issue when running mvn clean install.md
Last active September 13, 2022 12:13
mvn clean install - java.lang.ClassNotFoundException: org.apache.maven.plugin.surefire.log.api.ConsoleLogger
  • Problem: Issue when running mvn clean install,java.lang.ClassNotFoundException: org.apache.maven.plugin.surefire.log.api.ConsoleLogger

  • Resolution: Open pom.xml

    • From:
      </dependencies>
      <repositories>
      
    • To:
@caisback
caisback / NodeJs PubSub Using redis.md
Created May 23, 2021 23:39
NodeJs PubSub Using redis

*Pub:

var redis = require(“redis”);
var publisher = redis.createClient();
publisher.publish(“notification”, “{\”message\”:\”Hello world from Asgardian!\”}”, function(){
 process.exit(0);
});

*Sub:

@caisback
caisback / jasypt installation and how to use.md
Last active June 15, 2021 07:28
jasypt installation and how to use?
  1. Install jasypt on fuse/karf server
  • bundle:install camel-jasypt
admin@root()> features:install camel-jasypt
  1. Download the project
  1. Compile it using Maven
  • cd jasypt/jasypt
@caisback
caisback / Apache Camel Bindy.md
Created June 7, 2021 22:02
Apache Camel Bindy!
from("myRouteId")
    .process(exchange -> {
        ObjectMapper mapper = new ObjectMapper();
        Map<String, String> map = mapper.convertValue(new SimplePojo(), Map.class);
        exchange.getIn().setBody(map);
    })
    .marshal(new CsvDataFormat().setDelimiter(';').setQuoteMode(QuoteMode.ALL))
    .to("file:out/?fileName=ouput-file.csv");
@caisback
caisback / camel scheduler.md
Created June 17, 2021 22:27
camel scheduler
  • run ever 2am:
    • cron=0+0+2+++?
  • run every 2nd second:
  • cron=0/2+++++?
@caisback
caisback / Flutter - How to install on Ubuntu 21_04.md
Created June 22, 2021 22:02
Flutter - How to install on Ubuntu 21.04
  • $ sudo snap install flutter --classic
flutter 0+git.e75662a from Flutter Team✓ installed
  • $ flutter sdk-path
Initializing Flutter
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  136k  100  136k    0     0   123k      0  0:00:01  0:00:01 --:--:--  123k
@caisback
caisback / Trimming the json response data.md
Created June 29, 2021 07:56
Trimming the json response data, get only what you need