Copy Raspberry Image to a microSD Card
[type] df -h > to see what devices are currently mounted > look for sdx where /dev/mmcblk0 is located [type] dd if=/path/myimagefile.img of=/dev/sdx bs=4M
[type] df -h > to see what devices are currently mounted > look for sdx where /dev/mmcblk0 is located [type] dd if=/path/myimagefile.img of=/dev/sdx bs=4M
Find the correct device fdisk -l Unmount the device unmount /dev/sdc Wipe the device (handles bad blocks too) dd if=/dev/zero of=/dev/sdc bs=4k Format device mke2fs /dev/sdc1 Make a mount point mkdir /mnt/memstick Mount the device mount /dev/sdc1 /mnt/memstick
An interesting log in Apache hosts log (below) surprised me. I saw this URL crawl attempt by what is supposed to be Baidu – I checked – it was. What is so surprising is that the URL is a sentence of a DRAFT I was working on at the moment (screenshot below – notice the draft status bottom right). This...
Brilliant – where you need it – like when you accidentally try to open 8000 html files at once with your browser. sudo kill $(ps aux | grep ‘iceweasel’ | awk ‘{print $2}’) credit for Find and Kill All Processes One Liner – bash using grep and awk
http://www.google.com/search?q=search+for+this &as_sitesearch=example.com &as_eq=DO+NOT+include+these &prmd=u Turn off personalization &pws=0 Turn off autocomplete &complete=0 Return 30 results per page &num=30 Limit results by country &cr=countryUS &cr=countryDE Specify Language &lang_en – English &lang_de – Deutsch Simulate Button &btnG=Search Disable ads (simulation so that impressions are not counted, links disabled) &adtest=on Find related sites &as_rq=example.com
Problem with HTTPS in Perl When you see any of the below error messages, the solution is sudo apt-get install libssl-dev Error >> openssl-version.c:2:30: fatal error: openssl/opensslv.h: No such file or directory Error >> Warning: Prerequisite ‘Net::SSLeay => 1.46’ for ‘SULLR/IO-Socket-SSL-2.012.tar.gz’ failed when processing ‘MIKEM/Net-SSLeay-1.68.tar.gz’ with ‘make => NO’. Continuing, but chances to succeed are limited. Error >> t/connectSSL-timeout.t …………...
Debian/Ubuntu Linux : How To Fix a missing eth0 adapter after moving HDD from one machine to another. Explanation : Debian and Ubuntu write the MAC address of the ethernet adapter to a file that prevents the eth card in the new machine from being recognized. Delete the lines in this persistent-net.rules file and upon reboot, linux will see the...
<a href=”mailto:simone@the-forest.com?subject=Short Notice&body=Hi Simone, I’m arriving in less than 48 hours.”>Email Me</a> optional are (?) subject=Short Notice body=Hi Simone, I’m arriving in less than 48 hours. Minimum <a href=”mailto:simone@the-forest.com”>Email Me</a>
https://wiki.debian.org/PulseAudio sudo rm -Rf ~/.pulse sudo rm -Rf ~/.pulse-cookie sudo rm -Rf /tmp/pulse-* sudo vi /etc/pulse/client.conf ; autospawn = no sudo service pulseaudio restart
http://www.linuxstall.com/block-country-iptables/ http://www.ipdeny.com/ipblocks/ http://www.ipdeny.com/ipblocks/data/countries/ #!/bin/bash # country codes ISO="cn it kr br ru tw af sa iq sy tr ua in jp id at ro pl bg vn hk ve th mx co ar ir cz ph eg pk" # set path IPT=/sbin/iptables WGET=/usr/bin/wget EGREP=/bin/egrep $IPT-save -c > /home/iptables/iptables_bak_$(/bin/date +\%Y\%m\%d\%H\%M\%S).txt SPAMLIST="countrydrop" ZONEROOT="/root/iptables" DLROOT="http://www.ipdeny.com/ipblocks/data/countries" cleanOldRules(){ $IPT -F $IPT -X $IPT -t nat...
Debian 7 Apache 2.2.22 Virtualhost with only one website using ssl – ssl certificate is for www.example.com (not example.com) The following setup resolves the “unable to resolve host” error /etc/hosts 127.0.0.1 localhost {server ip address} www.example.com www /etc/hostname www.example.com However, if you have a new apache error [error] [client 127.0.0.1] script ‘/var/www/wp-cron.php’ not found or unable to stat Change hosts...
Checklist when rc.local does not run on boot on Debian 7 Wheezy Make sure file is located /etc/rc.local Permissions root:root 755 The shebang is in place in the first line #!/bin/sh -e You bash script has a . and full path ./home/me/myscript.sh The last line must be exit 0
[error] [client 127.0.0.1] script /var/www/wp-cron.php not found or unable to stat http://serverfault.com/questions/185954/hosts-file-entries-for-multiple-domains-on-vps 127.0.0.1 localhost localhost.localdomainxxx.xxx.xxx.xxx yourdomain1.com yourdomain1 yourdomain2.com yourdomain2 And those lines must have a few blank lines above the in the hosts file, or they will get overwritten each reboot.