Skip to content

Instantly share code, notes, and snippets.

View mmalmeida's full-sized avatar

Miguel Almeida mmalmeida

  • ITClinical
  • Lisbon
View GitHub Profile
<managedRepository>
<location>/srv/maven/public</location>
<releases>true</releases>
<blockRedeployments>false</blockRedeployments>
<snapshots>true</snapshots>
<scanned>true</scanned>
<deleteReleasedSnapshots>false</deleteReleasedSnapshots>
<skipPackedIndexCreation>false</skipPackedIndexCreation>
<stageRepoNeeded>false</stageRepoNeeded>
<id>itc-public</id>
@mmalmeida
mmalmeida / gist:7597733
Created November 22, 2013 10:15
Archiva stacktrace error
2013-11-22 10:14:09,589 [qtp2136389305-27] ERROR org.apache.archiva.redback.rest.services.DefaultUserService [] - Unable to find RBAC Object 'Repository Manage
r - public' of type org.apache.archiva.redback.rbac.jdo.JdoRole using fetch-group 'null'
org.apache.archiva.redback.rbac.RbacManagerException: Unable to find RBAC Object 'Repository Manager - public' of type org.apache.archiva.redback.rbac.jdo.JdoR
ole using fetch-group 'null'
at org.apache.archiva.web.security.ArchivaRbacManager.getRole(ArchivaRbacManager.java:220) ~[archiva-web-common-1.4-M4.jar:1.4-M4]
at org.apache.archiva.redback.rbac.AbstractRBACManager.getChildRoles(AbstractRBACManager.java:723) ~[redback-rbac-model-2.1.jar:2.1]
at org.apache.archiva.redback.rbac.AbstractRBACManager.gatherUniquePermissions(AbstractRBACManager.java:475) ~[redback-rbac-model-2.1.jar:2.1]
at org.apache.archiva.redback.rbac.AbstractRBACManager.gatherUniquePermissions(AbstractRBACManager.java:480) ~[redback-rbac-model-2.1.jar:2.1]
logme(){
while read -r line; do
logline="$(getdate): $line"
echo $logline >> "$current_log"
done
}
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<Configure id="xxx" class="org.eclipse.jetty.webapp.WebAppContext">
<Call name="setAttribute">
<Arg>org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern</Arg>
<Arg>.*/.*jsp-api-[^/]\.jar$|./.*jsp-[^/]\.jar$|./.*taglibs[^/]*\.jar$</Arg>
</Call>
<!-- Add an EnvEntry only valid for this webapp -->
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!--> <html lang="en"> <!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="utf-8" />
<title>Metronic | Data Tables - Editable Tables</title>
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<meta content="" name="description" />
@mmalmeida
mmalmeida / table_scrollable.html
Last active December 23, 2015 12:39
Updated table scrollable example. Both examples have an "issues" section to summarize findings
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="utf-8" />
@mmalmeida
mmalmeida / gist:6597566
Last active December 23, 2015 06:59
iptables
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -s 1.2.3.4/32 -p tcp -m tcp --dport 8000 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 8000 -j DROP
# Generated by iptables-save v1.4.4 on Tue Sep 17 18:24:47 2013
*filter
:INPUT ACCEPT [1087:102455]
@mmalmeida
mmalmeida / gist:5934939
Last active December 19, 2015 09:39
fail2ban - tomcat
jail:
[tomcat-manager]
enabled = true
port = 8080,8443
bantime = 3601
filter = tomcat-manager
maxretry = 4
logpath = /var/log/tomcat7/localhost_access_log.*.txt
# Generated by iptables-save v1.4.12 on Fri Jul 5 13:07:43 2013
*raw
:PREROUTING ACCEPT [1196585836:168682354246]
:OUTPUT ACCEPT [1201887532:172170812884]
COMMIT
# Completed on Fri Jul 5 13:07:43 2013
# Generated by iptables-save v1.4.12 on Fri Jul 5 13:07:43 2013
*nat
:PREROUTING ACCEPT [826810:62650151]
:INPUT ACCEPT [826341:62622011]
@mmalmeida
mmalmeida / gist:5933418
Last active December 19, 2015 09:29
fail2ban.log.1
fail2ban-regex test on my failed login's ssh log snippet:
Running tests
=============
Use regex file : /etc/fail2ban/filter.d/sshd.conf
Use log file : fake.log