Skip to content

Instantly share code, notes, and snippets.

View cleberjamaral's full-sized avatar
🎯

Cleber Jorge Amaral cleberjamaral

🎯
View GitHub Profile

How to use github as a maven repository

In this how-to it is being explained how to create a maven repository on github and how to use an existing one.

Creating a repository

  1. Clone your original project to a new local repository (change GROUP-NAME and PROJECT-NAME) git clone https://github.com/GROUP-NAME/PROJECT-NAME.git PROJECT-NAME-maven2

  2. Go to the clonned repository (use your PROJECT-NAME-maven2) cd PROJECT-NAME-maven2

How to create a camel component from archetype

Go to yout projects root folder

$ cd ~/my_projects_folder

Generate camel component structure from archetype

$ mvn archetype:generate -DarchetypeGroupId=org.apache.camel.archetypes -DarchetypeArtifactId=camel-archetype-component -DarchetypeVersion=2.23.0 -DarchetypeRepository=https://repository.apache.org/content/groups/snapshots-group -DgroupId=org.apache.camel.component -DartifactId=camel-helloworld

Type a version number o accept the suggestion

Define value for property 'version' 1.0-SNAPSHOT: your_version_number

@cleberjamaral
cleberjamaral / Merging-branch-into-master.md
Last active February 9, 2020 23:42
Merging git branch into master

Merging git branch into master

  1. go to master git checkout master

  2. make sure it is updated solving conflicts if they exist git pull origin master

  3. merge with the branch (list of branchs can be obtained by git branch) git merge branch_name

@cleberjamaral
cleberjamaral / creating-a-HTML-from-a-markdown-file.md
Last active February 10, 2020 07:46
Creating a HTML from this markdown file

Creating a HTML from this markdown file

  1. Open the md file in atom editor
  2. Check its preview in Packages > Markdown Preview
  3. Right click on the preview selecting "Copy As HTML"
  4. Paste in the html the content

more details are given by Ian Lurie

Editing checklist

Spelling

Have you checked all words you’re unsure of in a dictionary (especially commonly confused words such as: all right, all together, definitely, persuade).

Grammar

Are sentences grammatical? Does every sentence have at least a subject and a verb? Are there any comma splices or sentence fragments? Do nouns and verbs agree (e.g., singular with singular, plural with plural)?

Tense

Are tenses consistent (e.g., present or past, not inappropriately mixed)?

Punctuation

Are commas correctly placed? Have you used too many? Have you used apostrophes correctly? Have you used a semi-colon instead of a colon, or vice versa? Have you divided a sentence with a semi-colon instead of a comma?

Ignoring files which names matches the given pattern

# specific file
given_name

# files with extension "ext"
*.ext

# files with extension "ext" only in root folder
@cleberjamaral
cleberjamaral / Git-undo-local-changes.md
Last active February 25, 2020 03:21
Git-undo-local-changes

Git undoing local changes

  • Undoing git add / Unstaging changes git reset

  • Undoing a git reset git reset 'HEAD@{1}'

  • Undoing a git commit git reset HEAD^

@cleberjamaral
cleberjamaral / Signpost-correlative-conjunctions.md
Created March 30, 2020 00:20
Signpost of correlative conjunctions

Correlative conjunctions

@cleberjamaral
cleberjamaral / kubernetes-useful-commands.md
Last active April 18, 2020 06:12
Kubernetes useful commands

Useful commands for microk8s

  • List resources $ microk8s.kubectl get
  • Show detailed information about a resource $ microk8s.kubectl describe
  • Print the logs from a container in a pod $ microk8s.kubectl logs
  • Execute a command on a container in a pod $ microk8s.kubectl exec
  • Get all info from all namespaces $ microk8s.kubectl get all --all-namespaces
  • Get node log $ microk8s.kubectl describe nodes

Sources: