Restore the size of an USB Drive
Overwrite the first few sectors (32KB is more than enough) with zeroes, then open cfdisk or fdisk or gparted and create a new partition table in the format you like (gpt or mbr).
dd if=/dev/zero of=/dev/sdb bs=32k count=1
And for that side node, you can only dd an ISO to a USB and boot from it if it is a hybrid ISO, i. e. an ISO that starts with a MBR or GPT partition table, and whose content is laid out that it has both a traditional filesystem and an ISO filesystem where the same file names point to the same files. (Also the bootloader has to detect that case and boot from USB or CD properly depending on what drive is present).
https://superuser.com/questions/1086118/restore-the-size-of-an-usb-drive-linux
28/06/2019
Last modification on:
28/06/2019
Note ID: &(c31E8E)
ssh Tunneling
You have first to copy your public id to the ssh server.
Then you can execute the following code in a terminal:
ssh -D 5222 user@remoteserver -N
Set SOCKS proxy in browser as 5222 (or anything you like)
23/02/2019
Last modification on:
23/02/2019
Note ID: &(cZ31yp)
Shell Accounts
Paid:
http://www.ispeeds.net/shells.php ($2.5/Mo)
07/02/2019
Last modification on:
23/02/2019
Note ID: &(c1Hbsq)
Regular Expressions In grep examples
Match a character “v” two times:
egrep "v{2}" filename
The following will match both “col” and “cool”:
egrep 'co{1,2}l' filename
The following will match any row of at least three letters ‘c’.
egrep 'c{3,}' filename
The following example will match mobile number which is in the following format 91-1234567890 (i.e twodigit-tendigit)
grep "[[:digit:]]\{2\}[ -]\?[[:digit:]]\{10\}" filename
22/01/2019
Last modification on:
22/01/2019
Note ID: &(cmPVwh)
Non-Blocking Perl Pipes
Çoğu zurnanın zırt dediği yerdir burası:
https://davesource.com/Solutions/20080924.Perl-Non-blocking-Read-On-Pipes-Or-Files.html
17/12/2018
Last modification on:
17/12/2018
Note ID: &(c84_i1)
Predefined Names in perl
All perl predefined names in a list
15/12/2018
Last modification on:
15/12/2018
Note ID: &(cqmScv)
How to remove all line breaks from a string
This is probably a FAQ. Anyhow, line breaks (better: newlines) can be one of Carriage Return (CR, \r, on older Macs), Line Feed (LF, \n, on Unices incl. Linux) or CR followed by LF (\r\n, on WinDOS). (Contrary to another answer, this has nothing to do with character encoding.)
Therefore, the most efficient RegExp literal to match all variants is
/\r?\n|\r/g
https://stackoverflow.com/questions/10805125/how-to-remove-all-line-breaks-from-a-string
06/12/2018
Last modification on:
06/12/2018
Note ID: &(cKljle)
Convert all MTS files in MP4 and rename
find -exec
çok kullanışlı. Ama bazen kendi rekursiv programını yazman daha kestirme yol olabiliyor. Şu aşağıdakine benzer işler için ideal:
find -name "*.MTS" -exec sh -c 'ffmpeg -i "$1" -acodec copy -vcodec copy "${1%.MTS}.mp4"' _ {} \;
06/12/2018
Last modification on:
07/12/2018
Note ID: &(c0LYuG)
Find files greater than 2M and lesser then 10M
Find files greater than 2M and lesser then 10M in home directory sort them according to their size and convert size to human readable format
find ~/. -size +2M -size -10M -printf "%s %P\n" | sort -nk1 | numfmt —to=iec —format="%8f"
Şu tek satırın yaptığını yapması için koca bir c programı yazmıştım gençliğimde. Adı da file fisher kısaltması ffish
idi. Hey gidi gençlik hey!
06/12/2018
Last modification on:
17/12/2018
Note ID: &(cW0cvm)
Running Your Code at the Right Time
https://www.kirupa.com/html5/running_your_code_at_the_right_time.htm
In that short period of time between you wanting to load a page and your page loading, many relevant and interesting stuff happen that you need to know more about. One example of a relevant and interesting stuff that happens is that any code specified on the page will run. When exactly the code runs depends on a combination of the following things that all come alive at some point while your page is getting loaded:
05/12/2018
Last modification on:
05/12/2018
Note ID: &(cUOLEZ)
Limit cpu
Belirli bir process için cpu'yu %80'e kısmak istersek:
cpulimit -p PID -l 80%
30/11/2018
Last modification on:
21/12/2018
Note ID: &(c3sCZK)
Ferahfeza'nın sesini uzaktan açmak için kod
Ferahfeza'nın sesini uzaktan açmak için kod:
rmixer UP 192.168.8.121 7982 cl_req=67522
29/11/2018
Last modification on:
30/11/2018
Note ID: &(cPFUdP)
One-liner to do a find/replace in several files
find . -type f -print0 | xargs -0 -n 1 sed -i -e 's/from/to/g'
Rekursif çalışıp çalışmadığını test etmedim, ama işe yarıyor.
03/08/2014
Last modification on:
03/08/2014
Note ID: &(cuJQJE)
Thinking in OOP
Moving into OOP is what changes programming from dechipherable code into real, understandable thought that is easy to understand. You have to keep in mind that the computer thinks in specifics. In fact so specific that the only thing the computer truely understands (if understanding is proper terminology) is "electrical signal on." Perhaps not even "off" as that is simply the absence of an "on," but that's a matter of philosophy.
29/07/2014
Last modification on:
19/11/2018
Note ID: &(c2X_wh)
C++ Tutorial
http://www.tutorialpoint.com/cplusplus/cpp_environment_setup.htm
This reference will take you through simple and practical approach while learning C++ Programming language.
28/07/2014
Last modification on:
24/11/2018
Note ID: &(c8rB_k)
Chapter 12. Objects
http://docstore.mik.ua/orelly/perl3/prog/ch12_01.htm
Contents:
- Brief Refresher on Object-Oriented Lingo
- Perl's Object System
- Method Invocation
- Object Construction
- Class Inheritance
- Instance Destructors
- Managing Instance Data
- Managing Class Data
- Summary
Ve daha neler neler...
28/07/2014
Last modification on:
29/07/2014
Note ID: &(c36jUH)
Object Oriented Programming in PERL
http://www.tutorialpoint.com/perl/perl_oo_perl.htm
Before we start Object Oriented concept of perl, lets understand references and anonymous arrays and hashes
28/07/2014
Last modification on:
29/07/2014
Note ID: &(c690Gm)
Object Oriented Perl examples for OO beginners
http://www.perlmonks.org/?node_id=289076
A simple example OO script for total beginners
28/07/2014
Last modification on:
28/07/2014
Note ID: &(cCodTV)
File syncronisation over ssh
Assign aliases in .bashrc to sync files with one command. Two examples:
-
alias sync_note='cat Dropbox/Notizblock.txt | ssh kelbsmeen@bitcoinshell.mooo.com "cat > /var/www/localhost/htdocs/users/kelbsmeen/notepad.txt"'
-
alias sync_note='cat Werkstatt/notes/bitcoinshell.mooo/notes.cgi | ssh kelbsmeen@bitcoinshell.mooo.com "cat > /var/www/localhost/htdocs/users/kelbsmeen/cgi-bin/notes.cgi"'
Just like in old good days...
28/07/2014
Last modification on:
19/11/2018
Note ID: &(cUkQZ0)
Regular expressions in Perl
http://www.cs.tut.fi/~jkorpela/perl/regexp.html
This document presents a tabular summary of the regular expression (regexp) syntax in Perl, then illustrates it with a collection of annotated examples.
unknown
Last modification on:
unknown
Note ID: &(cIEbFG)
Mouse events
http://javascript.info/tutorial/mouse-events
Detailed javascript tutorial
unknown
Last modification on:
unknown
Note ID: &(cWqYeP)
Javascript Char Codes (Key Codes)
unknown
Last modification on:
unknown
Note ID: &(cITWs7)
Create Fractals with Recursive Drawing
http://matthewjamestaylor.com/blog/create-fractals-with-recursive-drawing
Computer graphics art
unknown
Last modification on:
unknown
Note ID: &(cugghx)
perlfaq5
http://perldoc.perl.org/perlfaq5.html
Official perl programming ducumentation. Frequently asked questions.
unknown
Last modification on:
unknown
Note ID: &(lb5dPu)
Perl programming documentation
unknown
Last modification on:
unknown
Note ID: &(lMjXgo)
SSH Login Without Password Using ssh-keygen
unknown
Last modification on:
unknown
Note ID: &(ckJlkV)
19 ffmpeg commands for all needs
24/11/2018
Last modification on:
24/11/2018
Note ID: &(coOM7H)
O'Reilly Perl Programming (Hash Reference)
In the sections that follow, you will find code examples designed to illustrate many of the possible types of data you might want to store in a record, which we'll implement using a hash reference. The keys are uppercase strings, a convention sometimes employed (and occasionally unemployed, but only briefly) when the hash is being used as a specific record type.
23/12/2018
Last modification on:
23/12/2018
Note ID: &(cs65sB)
Mount ntfs
mount -t ntfs-3g -o uid=1000,gid=1000,dmask=022,fmask=133 /dev/sdb1 /mnt
unknown
Last modification on:
unknown
Note ID: &(cLnh3d)
Simple HTML drop down hover menu using just CSS. No JavaScript
unknown
Last modification on:
unknown
Note ID: &(cK9dVW)