2. Run this at the command line:
python -c "print ''.join(list(reversed('!dlrow olleH')))"- Vasudev Ram - Dancing Bison EnterprisesContact Page
- "We are strategic but we stop at number crunching, we plan but we don't over manage, we inspire but we don't preach, we code but we're not monkeys."
- Sandschneider agrees that personal relations have an impact on political relations: "International politics is not a dehumanized process. It is about people coming together. And it is true that it is easier for two people who get along well to negotiate and solve problems than two people who can't stand each other."
- "Skeptics don't make history"
- "Germany won," said Glasman at the debate. "We have a Champions League final between two supporter-owned and democratically governed football clubs. Tradition and the preservation of institutional virtue are a source of energy and modernisation precisely because change and continuity work together; a balance of power is the best system; a negotiated settlement is better than one that is imposed, the domination of any interest violates the demand of what is good; the discovery of the common good between forces that are estranged is the best good of all. It takes longer to get there but the benefits are more enduring."
The rich, to adapt Jesus in St Matthew's Gospel, will always be with us; the 1 per cent are likely to pull ever further away. But this has its compensations. The lower-paid half of the British populace have never had to pay a smaller share of income tax than today, because the wealthy have never forked out more. And while there is not much David Cameron can do about the rich, there is still plenty he can do about the poor. He doesn't shout about it. But he has rightly concluded that this is where his attention is best focused.
"The rebels are brave but they don't even know the difference between a Kalashnikov bullet and a sniper bullet. That weakens the morale of the men," he said.
- Famous night owls include Winston Churchill, President Obama, Charles Darwin, James Joyce, Marcel Proust, Keith Richards and Elvis Presley. Famous early risers include Napoleon, Ernest Hemingway and George W. Bush.
Professor Jim Horne, of Loughborough University, said: "Evening types tend to be the more extrovert creative types, the poets, artists and inventors, while the morning types are the deducers, as often seen with civil servants and accountants.
This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter with a half-million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. . . . This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron.
- Decades of reform. Globalisation, and the global financial crisis. The uncertainties of the post-September 11 world. Eric Knight: "Those circumstances are ripe for misinterpretation, for populist interpretation, interpretation that focuses on the surface of things and often misses the deeper logic of what's happening."
- "No one ever fell in love gracefully."
- "Have you ever longed for someone so much, so deeply that you thought you would die? That your heart would just stop beating? I am longing now, but for whom I don't know. My whole body craves to be held. I am desperate to love and be loved. I want my mind to float into another's. I want to be set free from despair by the love I feel for another. I want to be physically part of someone else. I want to be joined. I want to be open and free to explore every part of them, as though I were exploring myself."
- Love is more easily experienced than defined. As a theological virtue, by which we love God above all things and our neighbours as ourselves for his sake, it seems remote until we encounter it enfleshed, so to say, in the life of another - in acts of kindness, generosity and self-sacrifice. Love's the one thing that can never hurt anyone, although it may cost dearly. The paradox of love is that it is supremely free yet attaches us with bonds stronger than death. It cannot be bought or sold; there is nothing it cannot face; love is life's greatest blessing.
From scratch, you won’t get the question when installing/updating/removing applications. That need to be enabled in your system. It will assume you want to do the action and do it. To make it ask first, you need to open a file and add a setting for it. To do it, follow this guide:
sudo gedit /etc/conaryrc
Add this line on a new row:
Save the file, now it will ask like you see below.
[tforsman@tforsman ~]$ sudo conary install chromium
[sudo] password for tforsman:
The following updates will be performed:
continue with update? [Y/n]
Iv’e been busy to find a way for users to see what’s been added to foresighters repo and able to download the recipe for the package. And now it’s possible.
First, you can see latest added recipes in the widget on the right side and browse all recipes here: https://www.foresightlinux.se/flr-recipes/
Don’t forget to look at Videos section, as Iv’e been planning to make some videos in the near future.
Wondered how Foresight Linux 7 looks like? Take a look at the video below.
By Vasudev Ram
youtube-dl is a video download tool written in Python.
I had blogged about youtube-dl a while ago, here:
youtube-dl, a YouTube downloader in Python 
and again some days later, here:
How to download PyCon US 2013 videos for offline viewing using youtube-dl
(The comments on the above post give some better / easier ways to download the videos than I gave in the post.)
Today I saw that a Hacker News thread about youtube-dl was on the front page of Hacker News for at least part of the day (up to the time of writing this). The thread is here:
youtube-dl (on Hacker News)
I scanned the thread and saw many comments saying that the tool is good, what different users are using it for, many advanced tips on how to use it, etc. The original creator of youtube-dl, Ricardo Garcia, as well as a top contributor and the current maintainer (Filippo Valsorda and Philipp Hagemeister, respectively) also participated in the HN thread, as HN users rg3, FiloSottile and phihag_, respectively. I got to know from the thread that youtube-dl has many contributors, and that its source code is updated quite frequently (for changes in video site formats and other issues), both points which I did not know earlier. (I did know that you can use it to update itself, using the -U option).
Overall, the HN thread is a worthwhile read, IMO, for people interested in downloading videos for offline viewing. The thread had over 130 comments at the time of writing this post.
(On a personal note, since I first got to know about youtube-dl and downloaded it, I've been using it a fair amount to download videos every now and then, for offline viewing, and it has worked pretty well. There were only a few times when it gave an error saying the video could not be downloaded, and I am not sure whether it was due to a problem with the tool, or with the video site.)
 My first post about youtube-dl also had a brief overview of its code, which may be of interest to some Pythonistas.
This other post which mentions youtube-dl may also be of interest:
The most-watched Python repositories on Github
since youtube-dl was one of those most-watched repositories, at the time of writing that post.
- Vasudev Ram - Dancing Bison EnterprisesSignup for emails about new products from me. Contact me for Python consulting and training.
We have created a foresighters repository for adding additional packages that don’t belong into main repository or in epel.
To be able to use all packages without thinking of specify the label, you can add a search line into system-model and add it in .conaryrc to make it work with conary rq ***
If the number of such compressed files are too many, uncompressing all of them with out knowing which one contains the data that we are looking for could be a waste of time. This is were xzgrep can come to rescue.
xzgrep can search through compressed files of the formar .bz2,.xz etc and look for strings in the files like grep does. The only difference is that xzgrep can only confirm whether the search string is present in the compressed file or not and not be able to list further details like grep does.
For example let us take two files
Let us create a tar file
Compress it using bunzip
This will create the compressed file hello.tar.bz2
Now to search for text inside this compressed file.
The string 12 is present is hello1 thus the ouput says that a match is found.
If match is not found, xzgrep does not mention any thing.
But note that the xzgrep works only on the text files inside the compressed file, like grep works only on text files. Thus if the search string is inside a pdf or any other document, xzgrep will not be able to pick it up.
Our goal is to encrypt /home. To achieve this, we'll attach a disk, encrypt it, move the entire /home data to this disk and create a symbolic link to /home.
Step1: We are going to use Linux Unified Key Setup. For that we need to install cryptsetup package.
# yum install cryptsetup
Step2: While using AWS, never attach the volume to be encrypted while launching the instance. If we do so, the instance will fail to boot up next time because it'll ask for decryption password while booting up which is not possible to supply in AWS. Still if it is absolutely mandatory to do this then I suggest trying to remove entries from fstab and crypttab but it is much easier to just attach the disk after the launching of the instance is done. Assuming that the attached disk is available at /dev/xvdf, we'll setup the encryption now.
# cryptsetup -y -v luksFormat /dev/xvdf
This will overwrite data on /dev/xvdf irrevocably.
Are you sure? (Type uppercase yes): YES
Enter LUKS passphrase:
We can verify the encryption parameters as well. Default is AES 256 bit.
# cryptsetup luksDump /dev/xvdf
Step3: We'll open the device and map it to /dev/mapper/home so that we can use it.
# cryptsetup luksOpen /dev/xvdf home
Enter passphrase for /dev/xvdf:
Step4: This step is optional. To further protect our data, we can zero out the entire disk before even creating the filesystem.
# dd if=/dev/zero of=/dev/mapper/home
Step5: Now we'll create a filesytem
# mkfs.ext4 /dev/mapper/home
Step6: Let us mount and copy the data from /home
# mkdir /myhome
# mount /dev/mapper/home /myhome
# cp -a /home/* /myhome/
# rm -rf /home
# ln -s /myhome /home
Great! Our /home directory is encrypted. But wait a minute.. this approach has a short coming. We have deliberately designed it so that the disk won't auto-mount during the boot because there is no way to give it a password in cloud environment during the boot. Since the disk won't mount, we won't be able to ssh into the machine because the authorized_keys file is kept inside the home directory of the user. To address this problem, either change the "AuthorizedKeysFile" in sshd_config or create a user with home directory in /var/lib or /opt and grant sudo for cryptsetup and mount commands. So after reboot, if we take the first approach, we would be able to ssh without any problem or we'll ssh via other user, mount the encrypted drive and then use it normally.
$ ssh mountuser@<ip>
$ sudo /sbin/cryptsetup luksOpen /dev/xvdf home
$ sudo /bin/mount /dev/mapper/home /myhome/
Couple of points to remember:
- Do not forget the LUKS password. It cannot be retrieved, if lost.
- Try it a couple of times on staging machines before doing it on the machines that matter.
Earlier we planned to use Fedora to build Foresight Linux upon. But some issues made it impossible to make that happen. So we will use Centos 7 as core and continue from there.
Now it’s possible to install centos 7 and get conary to work with it.
We have re-written the installation, so you can read how to install everything and get started.
But the catch here is file-like. It is like a file, except when it is not like a file.
The non-likeness I encountered concern's SFTPFile's truncate method. The native Python file object has a truncate method where the size is option, if not specified it will default to the current offset of the file. However SFTPClient's truncate method requires the size to be specified. Failure to specify an size value results in a TypeError exception concerning incorrect number of parameters.