I hereby claim:
- I am lf-araujo on github.
- I am lf_araujo (https://keybase.io/lf_araujo) on keybase.
- I have a public key ASDC617G4OLxNfss1M_U6m2IbC2CXS8kEWUOcZ5dg_yBmAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
.markdown-here-wrapper { | |
font-size: 14px; | |
line-height: 1.3em; | |
} | |
pre, code { | |
font-size: 13px; | |
font-family: Helvetica, Roboto, 'Courier New', Consolas, Inconsolata, Courier, monospace; | |
margin: auto 5px; |
In trying to find a tool that would allow periodic synchronization of photos with Flickr, I discovered a small script. It works with a python2 written small command line software called flickrsmartsync and works pretty well. The tool can even be automated using a cron job. In what follows the steps to make this work will be presented.
We will be using two tools:
*This is part of a series of posts about the Genie programming language. I am updating my progress in learning the language from scratch in the hopes it will be useful for anyone also trying to get to programming in the linux/Gtk world. This is an extremely basic overview of how loops look like in Genie. If you have any experience with other languages, there will be nothing new to you.* | |
Here is a for loop that will print a series of numbers and report that it is finished: | |
``` | |
[indent=4] | |
init | |
for var I = 1 to 10 | |
print I.to_string() | |
print("All done!") |
*This is part of a series of posts about the Genie programming language. I am updating my progress in learning the language from scratch in the hopes it will be useful for anyone also trying to get to programming in the linux/Gtk world.* | |
The main scientific programming languages are R and Python. These, however, are slow languages for general development. Recently I found out about Vala and it's python-like sister language Genie. It is a joy to learn and to use. Below I make a few comparisons between Python, Vala and Genie. | |
Vala seems to have a syntax similar to Java and C#, which are popular languages. Taking from the number of questions in StackExchange, I suppose it is becoming itself very popular for this reason. It is translated to C code trough the vala compiler and from C code to the binaries. That means Vala is a simpler syntax for C, which comes with all the advantages of that known, widely used, reliable language. The fun finding comes now. Their authors (not sure if the very same people, but a Gn |
*This is part of a series of posts about the Genie programming language. I am updating my progress in learning the language from scratch in the hopes it will be useful for anyone also trying to get to programming in the linux/Gtk world.* | |
Wonder how a Gtk window would look like in Genie? Here is a simple example: | |
``` | |
/* GTK+ Genie Sample Code - compile with valac --pkg gtk+-2.0 hello-gtk.gs */ | |
uses | |
Gtk | |
init |
*This is part of a series of posts about the Genie programming language. I am updating my progress in learning the language from scratch in the hopes it will be useful for anyone also trying to get to programming in the linux/Gtk world.* | |
Let's now move on to more complex Gtk designs. These are not necessarily useful, but serve as good example on how to code them. Here is an example of how to design the window by using grids. The next posting will be about containers using boxes. | |
```vala | |
[indent=4] | |
uses Gtk | |
class TestWindow : Window |
*This is part of a series of posts about the Genie programming language. I am updating my progress in learning the language from scratch in the hopes it will be useful for anyone also trying to get to programming in the linux/Gtk world.* | |
This is an improved design than the previous exercise. The objective is very similar, but now with boxes to hold the structure of the window. | |
```vala | |
/* Compile with: valac --pkg gtk+-3.0*/ | |
[indent=4] | |
uses Gtk |
Here is an example of how to have your documents periodically synced to google docs. We will be using two Unix tools: [ grive ](https://github.com/Grive/grive) and [ cron ](http://en.wikipedia.org/wiki/Cron). | |
## Installing grive | |
You can install grive simply by calling: | |
```bash | |
sudo apt-get install grive | |
``` |
*This is part of a series of posts about the Genie programming language. I am updating my progress in learning the language from scratch in the hopes it will be useful for anyone also trying to get to programming in the linux/Gtk world.* | |
## Regular expressions made easy | |
Some time ago I came across a Python class that was designed to make [regular expressions]( https://en.wikipedia.org/wiki/Regular_expression) easier for [beginners]( https://www.reddit.com/r/Python/comments/3zpgj1/pythonverbalexpressions_regular_expressions_made ). It essentially makes this easily to type but baffling code: | |
``` | |
^https?://(?:www\\.)?[^\s]$ |