Oracle 11g on localhost for dev

In case you cannot access console due to ssl_error_weak_server_cert_key,
you could switch it to unsecure:

set ORACLE_UNQNAME=orcl
set ORACLE_HOSTNAME=localhost
emctl unsecure dbconsole

 

Veröffentlicht unter Allgemein

Attribute userAccountControl

Const ADS_UF_ACCOUNT_DISABLE = 2
Const ADS_UF_PASSWD_NOTREQD = 32
Const ADS_UF_DONT_EXPIRE_PASSWD = 65536

'Alle Accounts, die deaktiviert sind:
' => ADS_UF_ACCOUNT_DISABLE = 2
' => 
ldapFilter = "(userAccountControl:1.2.840.113556.1.4.803:=2)"

'Alle Accounts, die nicht deaktiviert sind:
' => ADS_UF_ACCOUNT_DISABLE = 2
' => 
ldapFilter = "(!(userAccountControl:1.2.840.113556.1.4.803:=2))"

'Alle Accounts, die kein Passwort benötigen ODER deren Passwort nie abläuft:
' => ADS_UF_PASSWD_NOTREQD And ADS_UF_DONT_EXPIRE_PASSWD = 32 + 65536 = 65568
' => 
ldapFilter = "(userAccountControl:1.2.840.113556.1.4.804:=65568)"

'Alle Accounts, die deaktiviert sind UND die kein Passwort benötigen:
' => ADS_UF_PASSWD_NOTREQD And ADS_UF_ACCOUNT_DISABLE = 32 + 2 = 34
' => 
ldapFilter = "(userAccountControl:1.2.840.113556.1.4.803:=34)"

mehr: http://www.selfadsi.de/ads-attributes/user-userAccountControl.htm

Veröffentlicht unter Allgemein

MinifyFilter

package com.ofrick.filters;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.regex.*;

public class MinifyFilter implements Filter {

private Pattern regex = null;
 
 // This method is called once on server startup
 public void init(FilterConfig filterConfig) 
 {
 regex = Pattern.compile("^\\s*$\\n|\\t", Pattern.MULTILINE);
 }
 
 // This method is called for every request and needs to be thread safe.
 public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) 
 throws java.io.IOException, javax.servlet.ServletException 
 {
 HttpServletResponse resp = (HttpServletResponse) response;
 ResponseWrapper wrapper = new ResponseWrapper(resp);
 chain.doFilter(request, wrapper);
 
 String html = wrapper.toString();

html = regex.matcher(html).replaceAll("");
 //html = multipleSpaces.matcher(html).replaceAll(" ");
 resp.setContentLength(html.getBytes().length);
 PrintWriter out = resp.getWriter();
 out.write(html);
 out.flush();
 out.close();
 }
 
 // This method is called once on server shut down
 public void destroy() 
 {
 //
 }
 
 static class ResponseWrapper extends HttpServletResponseWrapper {
 private CharArrayWriter output;

public ResponseWrapper(HttpServletResponse response) {
 super(response);
 this.output = new CharArrayWriter();
 }

public String toString() {
 return output.toString();
 }

public PrintWriter getWriter() {
 return new PrintWriter(output);
 }
 }
 
}
Veröffentlicht unter Allgemein

Config snippet for JRun

Config snippet for JRun

<!–
<filter>
<filter-name>MinifyFilter</filter-name>
<filter-class>com.ofrick.filters.MinifyFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>MinifyFilter</filter-name>
<url-pattern>*.cfm</url-pattern>
</filter-mapping>
–>

MinifyFilter.java

Veröffentlicht unter Allgemein

find changed files using PowerShell

Get-ChildItem -Recurse | Where-Object { $_.LastWriteTime -ge (get-date).AddHours(-24) -and $_.FullName -like „f:\go2005\*.c*“ } | ForEach-Object{$oldname = $_.Fullname; $newname = $($_.FullName).replace(‚F:‘,’F:\svn\f‘); New-Item -ItemType File -Path $newname -Force; Copy-Item $oldname $newname;}

Get-ChildItem -Recurse | Where-Object { $_.LastWriteTime -ge (get-date).AddMonths(-10) -and $_.FullName -like „S:\go2005\application\*.cfm“ } | ForEach-Object{$oldname = $_.Fullname; $newname = $($_.FullName).replace(‚S:‘,’D:\Users\Frick\Documents\sw0052sync\server\f‘); New-Item -ItemType File -Path $newname -Force; Copy-Item $oldname $newname;}

Get-ChildItem -Recurse | Where-Object { $_.LastWriteTime -ge (get-date).AddMonths(-10) -and $_.FullName -like „S:\go2005\application\*.cfc“ } | ForEach-Object{$oldname = $_.Fullname; $newname = $($_.FullName).replace(‚S:‘,’D:\Users\Frick\Documents\sw0052sync\server\f‘); New-Item -ItemType File -Path $newname -Force; Copy-Item $oldname $newname;}

Veröffentlicht unter Allgemein

configure ffmpeg

./configure –disable-lua –disable-mad –disable-avcodec –disable-postproc –disable-a52 –enable-run-as-root –disable-glx

Veröffentlicht unter Allgemein

Refresh page to break out of frame

Refresh page to break out of frame:

<script type="text/javascript">
 if (top.location!= self.location) { top.location.replace( self.location.href ); }
 </script>
Veröffentlicht unter Allgemein

Postgres for Hyperic

cd C:\Opt\pgsql
mkdir C:\Opt\pgsql\log

bin\initdb.exe -U postgres -A password -E utf8 -W -D C:\Opt\pgsql\data

bin\pg_ctl.exe -D „C:/Opt/pgsql/data“ -l „C:/Opt/pgsql/log/pgsql.log“ start

bin\createuser.exe -U postgres -P

bin\createdb.exe -U postgres -e HQ

C:\Opt\server-4.6.6\bin\hq-server.bat install

Veröffentlicht unter Allgemein