Samstag, 26. September 2015

Linux Filename im Terminal ändern

Filename Punkte und Leerzeichen durch _ ersetzen

rename 's/[. -]+/_/g' *

Lowercase

for i in $( ls | grep [A-Z] ); do mv -i $i `echo $i | tr 'A-Z' 'a-z'`; done

Ersetzen

rename 's/hier_ist_der_zu_ersetzende_text//g' *

pyload auf bestimmte Version downgraden

Folgendes in einem Terminal ausführen:

pyLoadCore --quit

cd ~/
rm -R pyload201508/
mkdir pyload201508
cd pyload201508/

wget https://github.com/pyload/pyload/archive/5e15580202c44628f2fbfabad0c3f693975fb3c9.zip
unzip *.zip
mv pyload* pyload

sudo -s
rm -R /usr/share/pyload
mv pyload/ /usr/share/

exit

cd /usr/share/pyload/
./pyLoadCore.py --daemon


ddrescue

Image eines Datenträgers erstellen

Image erstellen:
clear && date && sudo ddrescue /dev/sdb /media/andy/iomega/raspberrypi_pyload.img && date

Image zurückspielen:
date && sudo ddrescue /media/andy/iomega/raspberrypi.img /dev/sdb --force && date

Installation 
sudo apt-get install gddrescue

Mittwoch, 26. August 2015

Pfad eines Linux Comandos anzeigen


You can use "type" or "whereis" command to find out which command shell executes and to print binary (command) file location for specified command.

whereis command example

Display ls command location along with man page path:
whereis ls
Output:
ls: /bin/ls /usr/share/man/man1p/ls.1p.gz /usr/share/man/man1/ls.1.gz

type command example

Find out which command the shell executes:
type -a ls
Output:
ls is aliased to `ls --color=tty'
ls is /bin/ls



Source: http://www.cyberciti.biz/tips/find-linux-unix-command-location.html

Sonntag, 22. März 2015

Batch-File An Taskleiste anheften

Leider ist es nicht so leicht eine Batchdatei an die Windows 7 Taskleiste anzuheften. Mit diesem Trick geht’s:

1. Die anzuheftende Batchdatei von batch.bat nach batch.exe umbenennen.

2. Die Batchdatei nun in die Taskleiste ziehen und anheften.

3. Nun die original Batchdatei wieder umbenennen in batch.bat.

4. Mit gedrückter Shift-Taste mit der rechten Mausstaste auf die Verknüpfung klicken und auf Eigenschaften klicken.

5. Unter Ziel nun den korrekten Pfad zur Batchdatei eingeben. Es reicht aus, aus dem .exe ein .bat zu machen.
Text Files per CommandLine kombinieren: copy *.js bigfile.txt

Sonntag, 27. Juli 2014

Wake-On-Lan Broadcast DIR-826l

In Firefox, in Firebug's console, execute the following: check_LAN_ip=function(){return true;}; check_address=function(){return true;}; and then try to save the settings. Let me know if it works.

Freitag, 2. Mai 2014

Tabelle Flachklopfen

 SELECT * FROM (  
 SELECT 'OA' OBJECT_NAME, 'EU' REGION FROM DUAL UNION ALL  
 SELECT 'OB' OBJECT_NAME, 'EU' REGION FROM DUAL UNION ALL  
 SELECT 'OC' OBJECT_NAME, 'EU' REGION FROM DUAL UNION ALL  
 SELECT 'OA' OBJECT_NAME, 'US' REGION FROM DUAL UNION ALL  
 SELECT 'OB' OBJECT_NAME, 'AS' REGION FROM DUAL UNION ALL  
 SELECT 'OC' OBJECT_NAME, 'AS' REGION FROM DUAL ) S  
 PIVOT (COUNT (*) FOR REGION IN ('EU', 'US', 'AS'))  

Freitag, 25. April 2014

Linux Mint gedit Problem

The following packages have unmet dependencies: gedit-plugins : Depends: gedit (>= 3.8) but 2.30.5+petra is to be installed E: Unable to correct problems, you have held broken packages. apt purge gedit gedit-common apt install gedit/saucy gedit-common/saucy Source:

Donnerstag, 10. April 2014

ORA-01007: variable not in select list

the Problem was a DB-Link has been recreated and the Objects on that Schema had not been recompiled. SET SERVEROUTPUT ON; DECLARE c SYS_REFCURSOR; s_dummy VARCHAR2 (1); s_dummy_culprit VARCHAR2 (1); BEGIN OPEN c FOR 'select dummy from dual'; FETCH c INTO s_dummy, s_dummy_culprit; --<== here is the problem CLOSE c; END; /

Freitag, 28. März 2014

Dienstag, 25. Februar 2014

Notepad++ Makro Generator "Find In Files"

1:  SET SERVEROUTPUT ON;  
2:  SET LINES 256  
3:  SET TRIMOUT ON  
4:  SET SPACE 1  
5:  SET tab OFF  
6:  DECLARE  
7:   dummy  NUMBER;  
8:  BEGIN  
9:   FOR n IN (SELECT 'A.B' func FROM DUAL  
10:        UNION ALL  
11:        SELECT 'A.C' func FROM DUAL) LOOP  
12:    DBMS_OUTPUT.put_line ('<Action type="3" message="1700" wParam="0" lParam="0" sParam="" />');  
13:    DBMS_OUTPUT.put_line ('<Action type="3" message="1601" wParam="0" lParam="0" sParam="' || n.func || '" />');  
14:    DBMS_OUTPUT.put_line ('<Action type="3" message="1625" wParam="0" lParam="0" sParam="" />');  
15:    DBMS_OUTPUT.put_line ('<Action type="3" message="1653" wParam="0" lParam="0" sParam="C:\repo_facts\branches\" />');  
16:    DBMS_OUTPUT.put_line ('<Action type="3" message="1652" wParam="0" lParam="0" sParam="*.*" />');  
17:    DBMS_OUTPUT.put_line ('<Action type="3" message="1702" wParam="0" lParam="32" sParam="" />');  
18:    DBMS_OUTPUT.put_line ('<Action type="3" message="1701" wParam="0" lParam="1656" sParam="" />');  
19:   END LOOP;  
20:  EXCEPTION  
21:   WHEN NO_DATA_FOUND THEN  
22:    NULL;  
23:   WHEN OTHERS THEN  
24:    NULL;  
25:  END;  
26:  /  

Samstag, 25. Januar 2014

Code Formatter for Blogspot

http://codeformatter.blogspot.ch

unrar all files in a directory

Ohne Passwort
  nohup find . -regex \.\*part[0]?[0]?1.rar -exec unrar x -inul {} \; & 

Mit Passwort
  nohup find . -regex \.\*part[0]?[0]?1.rar -exec unrar x -inul -pPASSWORD {} \; &


Mittwoch, 22. Januar 2014

pyLoad@nas doesn't unpack after download

be shure that you have installed unrar and unzip

then go into /bin

cd /bin

find the location of unrar an unzip:

find / -iname unrar
find / -iname unzip

now create two symlink:

ln -s /opt/bin/unrar
ln -s /opt/bin/unzip

Now pyLoad should extract after finish downloading a package


PL/SQL Generate Range of number

I had the problem to select a number field with leading blanks.. this is my solution:


SELECT LPAD (
             LEVEL + doc_num_from - 1
            ,12
            ,' '
            )
         AS rnum
  FROM DUAL
CONNECT BY LEVEL < doc_num_to - doc_num_from + 2

Freitag, 30. August 2013

RegExp Snippets

Insert Statements in Oracle SQL:

INSERT\s+INTO\s+(cache|cache_bootstrap|cache_field|cache_form)[^\;]+

Freitag, 21. Juni 2013

Word: Inhaltsverzeichnis zusätzliche Ebene einfügen



Inhaltsverzeichnis markieren

alt+f9 drücken

An der Stelle des Inhaltsverzeichnisses wo 1-3 steht, einfach 1-4 eintragen.

Danach wieder alt+f9 drücken

dann das gesamte Inhaltsverzeichnis aktualisieren

Montag, 4. März 2013

OWB getting started Tipps

Alle Objekte minimieren:
. CTRL+A -> Graph -> Minimize

Vogelperspektive
. View -> Birds-Eye

Mittwoch, 9. Januar 2013

SSRS Kopfzeile beim Scrollen fixieren

Advanced Mode:



 Row Groups:





Es wird die erste Zelle Markiert


Im Properties Menu:


Nun bleibt die erste Zeile beim Scrollen sichtbar.

Donnerstag, 27. Dezember 2012

SSRS Seitenumbrüche in Reports entfernen

Damit ein Report auf einer Seite Dargestellt wird, muss folgende Einstellung gemacht werden: