Skip to content

Instantly share code, notes, and snippets.

Pavol Loffay pavolloffay

Block or report user

Report or block pavolloffay

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Git
https://www.atlassian.com/git/tutorials/merging-vs-rebasing/workflow-walkthrough
git rebase -i HEAD~2
git push my --force
View gist:2175416f816077135710
CDI scopes
javax.enterprise.context.@RequestScoped
javax.enterprise.context.@SessionScoped
javax.enterprise.context.@ApplicationScoped
javax.enterprise.context.@ConversationScoped - If the user is doing multiple things at the same time, there are multiple conversations.
javax.enterprise.context.@Dependent - default scope. An instance of a dependent bean is never shared between different clients or different injection points. It is strictly a dependent object of some other object. They don't use proxy objects.
javax.inject.@Singleton - don’t have a proxy object. Clients hold a direct reference to its instance. Problems with serialization it's better to add @ApplicationScoped allowing the container to proxy the bean
@SessionScoped or @ConversationScoped must be serializable
Qualifiers
View Links
View inventory resource hierarchy
curl -ivX POST -H 'Content-Type:application/json' -d '{"id": "foo" }' http://jdoe:password@localhost:8080/hawkular/inventory/resourceTypes
curl -ivX POST -H 'Content-Type:application/json' -d '{"id": "query" }' http://jdoe:password@localhost:8080/hawkular/inventory/resourceTypes
curl -X GET -H 'Content-Type:application/json' http://jdoe:password@localhost:8080/hawkular/inventory/resourceTypes/foo
curl -ivX POST -H 'Content-Type:application/json' -d '{"id":"parent", "resourceTypePath": "/rt;foo"}' http://jdoe:password@localhost:8080/hawkular/inventory/test/resources
curl -ivX POST -H 'Content-Type:application/json' -d '{"id":"parent_children", "resourceTypePath": "/rt;foo"}' 'http://jdoe:password@localhost:8080/hawkular/inventory/test/resources/parent'
curl -ivX POST -H 'Content-Type:application/json' -d '{"id":"parent_children2", "resourceTypePath": "/rt;query"}' 'http://jdoe:password@localhost:8080/hawkular/inventory/test/resources/parent'
curl -ivX POST -H 'Content-Type:application/json' -d '{"id":"paren
@pavolloffay
pavolloffay / Inventory Resource configuration + validation
Last active Aug 29, 2015
Inventory Resource configuration + validation
View Inventory Resource configuration + validation
ResourceType
curl -ivX GET 'http://jdoe:password@localhost:8080/hawkular/inventory/resourceTypes/fooType/data?dataType=configurationSchema'
curl -ivX GET 'http://jdoe:password@localhost:8080/hawkular/inventory/resourceTypes/fooType/data?dataType=connectionConfigurationSchema'
curl -ivX POST -H 'Content-Type:application/json' -d '{"id": "fooType" }' http://jdoe:password@localhost:8080/hawkular/inventory/resourceTypes
curl -ivX POST -H "Content-Type:application/json" -d '{"role": "configurationSchema", "value": {"title": "Foo resource configuration schema", "type": "object"}}' 'http://jdoe:password@localhost:8080/hawkular/inventory/resourceTypes/fooType/data'
curl -ivX PUT -H "Content-Type:application/json" -d '{"value": {"title": "Foo resource configuration schema", "type": "object", "required": ["man"],"properties": {"man": {"type": "integer"}}}}' 'http://jdoe:password@localhost:8080/hawkular/inventory/resourceTypes/fooType/data?dataType=configurationSchema'
curl -ivX PUT -H "Content-Type:application/json" -d
View Hawkular_ui_devel.sh
In hawkular-ui-services root
bower link
In hawkular root
mvn clean install -Pdev,link -Dbower.link.package=hawkular-ui-services
In hawkular/console/target/gulp-build
gulp watch-server
Compile hawkular-ui-services
View spark
public class Pair {
public String first;
public JavaDStream<MetricData> second;
public Pair(String first, JavaDStream<MetricData> second) {
this.first = first;
this.second = second;
}
}
View Metrics REST
By default data are deleted after 7 days
-H "Hawkular-Tenant:28026b36-8fe4-4332-84c8-524e173a68bf"
Metrics module info
curl -ivX GET http://localhost:8080/hawkular/metrics
curl -ivX GET -H "Hawkular-Tenant:28026b36-8fe4-4332-84c8-524e173a68bf" 'http://localhost:8080/hawkular/metrics/metrics?type=gauge'
curl -ivX GET -H "Hawkular-Tenant:id1" 'localhost:8080/hawkular/metrics/metrics?type=availability'
Tenants
curl -ivX GET 'http://localhost:8080/hawkular/metrics/tenants'
View R
install.packages('rjson')
install.packages('RCurl')
install.packages('fpp')
install.packages('xts')
library(rjson)
library(RCurl)
library(fpp)
library(xts)
@pavolloffay
pavolloffay / install
Last active Nov 7, 2015
Fedora install
View install
sudo dnf grouplist
Xfce
sudo dnf install xfce4-weather-plugin.x86_64 xfce4-cpugraph-plugin.x86_64 xfce4-sensors-plugin.x86_64 xfce4-xkb-plugin xfce4-whiskermenu-plugin.x86_64 xfce4-mixer
Utils
sudo dnf install gvim vim mc xchat gitk figlet
Latex
sudo dnf install texlive texlive-upquote.noarch texlive-blindtext.noarch texlive-bibtex.noarch texlive-babel.noarch texlive-babel-slovak
You can’t perform that action at this time.