Time machine is one of those great thing that OS X have, it have saved me from reinstalling everything by hand when I experiment with my computer, making a full backup (including system, applications, configurations, etc..) helps me to erase the SSD whenever I want without worrying me about missing files. Even if you don’t want to erase your hard drive, maybe it just died, having a backup will have your system in the same way it was, just like if nothing ever happened.
But, also, Time Machine is a space consuming thing, because we create a lot of files, most of them gets backed up (for instance, I don’t backup the Download folder or the virtual machines) and when you upgrade your system a big backup is made. So, it’s easy to fill a disk
I have a 1.5 TB HDD for backups, and my backups are from april 2013, I don’t really think I need something from that far,I don’t even remember what was in my computer that time. Deleting those backups can give to me some free space. At the end Time Machine will delete those old backps when the space is out.
So, to start, I want to delete all my backups from 2013. I can use “tmutil delete” to delete them, so, lets find which ones are about to be deleted.
Now that we now which ones are going to be removed, just call “tmutil delete” to delete them.
I just hope everything go fine 😀
So, I have a broken PS3 (the slim version, similar to the one above this lines). And I didn’t have the money to get a new PS4 but instead got a new PS3 for half the price of the PS4.
I also have a Nintendo Wii wich we use basically as a Netflix player; I actually bought the first PS3 and the Wii at the same time, nintendo knows how to make thigs that lasts. The other PS3 is also a netflix player but is were I usually play my games (I don’t do PC gaming, sorry).
The problem with Wii is that it supports 480p video output only and the Netflix App is old and lacks of features that are present in the PS3, like the auto play in series; also the cache is pretty small so repeating an scene requires it to reload that chunk. So, I’ve been thinking in replacing the Wii as the default Netflix player.
I’m thinking in getting an Apple TV for that, is cheap, small, it’s designed for video and supports Netflix. I also can do AirPlay from the iPads and play Music with iTunes. The Apple TV is pretty simple and I asume that my kids will learn how to use it pretty fast. But..
For the same price I can get a new PS3 (slim) motherboard and get the old PS3 working again, is basically the same price. The pro: Games, I would like to say an extra BlueRay Player but to be honest we don’t play BlueRay either.
Now I need to choose, repair the PS3 and get one exclusively for me (and share the other in the living room) or the Apple TV. I don’t know.. 🙁
I think it’s better to wait until September
Nothing but the true, many of the people that I know put their facebook avatar with colo stripes showing their support to what in the moment was the gay proud. They don’t remember or even feel embarased about that.
Note, this doesn’t happen only with LGTB, there are many other cases, like the native people victims of racism. Most people publish in their facebook wall that they support local business but they won’t stop buying at oxxo (something like 7 eleven). Other people “support” using bycile for transportation but they use the bike lanes for the cars and get mad if someone asks them to move. Or people that support fitnes and healty way of life but drinks one or two liter of soda a day, eat hamburguers, mexican fast food and no exercise at all.
People, if you want to change, please, start by changing yourself.
So.. I had this issue where I have to replace stuff in the code where the text is splitted across several lines, this is basically because the string is too long and we usually keep the 80 characters width in the code (PEP-8) but this also works in HTML where for example, comments are splitted across several lines.
Let’s say that I want to remove the call to a function that process a text, the most common function that process text is the one everyone uses for translations: _()
. The easy way is just to try a simple search and replace in vim:
:%s/_(\(.\{-}\))/\1/gc
Which will replace search for something like _("Translate this")
and will leave it like this: "Translate this"
. the :%s
part indicates that we want to search across the whole file, /
is the delimiter, there are three delimiters, the pattern, the replacement and operation flags. Since we want to match _(.*)
but we want to preserve what’s inside the parenthesis we need to create a backreference and we need to surround that between \(
and \)
. The dot .
matches every character except new lines. Please note that we use \{-}
instead of the most common *
(asterisk) for “one or more” occurrences. This is because \{-}
will match as few as possible, while *
is too greedy and will stop at the last occurrence. Then we set the replacement string, we wanted to leave the string intact so we just use the backreference: \1
is the first backreference, \2
for the second and so on. The last gc
are there just to ask you for every match, but you can just press “a” to apply to everyone.
If you want to search/replace multiple lines, then you can just use the \_.
pattern in vim, that pattern matches every character including new lines.
:%s/_(\(\_.\{-}\))/\1/gc
So, for example:
_("This is a text" " That is splitted across" " several lines").upper()
after :%s/_(\(\_.\{-}\))/\1/gc
will be
"This is a text" " That is splitted across" " several lines".upper()
The main problem when compiling is the tons of disk access that compile involves from compiling, linking, stripping etc… if you have a regular hard disk you know this may take a lot of time, most if the project is large. If you have an SSD the problem is not the speed, but still the lots of read/write access even when SSDs are pretty much more reliable that they were years ago.
A simple fix is to use ram disk. I’m not going to tell you how to do it in linux, because in linux you basically mount tmpfs in a directory and you are done, but in OS X this may be a bit tricky. In particular if we talk about macports.
Macports build directory is /opt/local/var/macports/build, so we need to mount a ramdisk here. But first we need to create it.
hdiutil attach -nomount ram://2097152 /dev/disk10
That should create a ramdisk with about 1GB, if you want to use less or more ram you can of course tune the “ram” parameter to fit what’s best for you, it doesn’t means the size in bytes/kbytes, it mean the number of 512 bytes sectors. Then format and mount in /opt/local/var/macports/build:
newfs_hfs /dev/disk10 sudo mount -t hfs /dev/disk10 /opt/local/var/macports/build
And you are done, just use macports as usual. Please note that there might be some ports that fails to build because some of them expect the build directory to be in the same storage .
After you are done compiling you probably want to delete that ramdisk, just use hdiutil detach $dev for that.
[vc_row][vc_column width=”1/2″][vc_column_text]
[/vc_column_text][/vc_column][vc_column width=”1/2″][vc_column_text]
[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column width=”1/1″][vc_column_text]Where the hell are my 300Mb ?[/vc_column_text][/vc_column][/vc_row]
I’ve been an iOS user for not that long time, I come from using OS X in the desktop and Android in the mobile, but now I have an iPhone and an iPad which completes the triplet and it’s true, they are better together, although iOS can’t compare with OS X there are some things that can make it easier for many people to handle, this are again the things I don’t like and my wishes on iOS:
With iOS 8 it was really a delight to be able to choose my default email client. I no longer use the Mail app, which is fine, works great but there are better options, more if you take in count that the others offer push notifications on Gmail accounts (on which I heavily depend). I won’t deny it, I like Safari, but probably if I could I would use Chrome as my default browser, and I remark “probably” because I have to admit that I like Safari, it works great but having the choice is better.
I don’t have an Apple Watch, why should I have to carry with the Apple watch software, Also, I don’t use reminders, notes, Mail, iBooks, I use Wunderlist, Evernote, CloudMagic, and Kindle; I don’t use Tips or Podcasts at all.
This is bloatware like with any other product, Samsung does the same, HTC does the same, almost every company does the same, maybe motorola is the one that have the most lean Android experience. And I know that this is something that will never happen, if Apple let the users uninstall those apps the usage of those apps would drop dramatically (the same with safari), but they use space in the device and that’s not cool, at least the less popular apps should be able to be removed, like stocks, who the hell use stocks?
On the other side, there are apps that are completely missing in the iPad, like the calculator.
Sometimes I share my iPad with my daughter, having profiles would let me get out of the scope those apps that I don’t want her to open, like my email client, my pictures, my browser history, facebook/twitter and I also may don’t have to see her apps (mostly games) in the springboard.
Having a guest profile will allow me to share my iPad to somebody that come to visit me without worry, nobody should be able to see my personal stuff.
Several things went from iOS to OS X, like the notifications area which is in some way similar to iOS, but there is something different, the widgets, like the social, you can’t just tweet by pulling the notification area in iOS but you can in OS X.
Apple is pushing iCloud storage, they give to you 5Gb for free, but you will surely need more, and they are willing to sell, maybe that’s why you can’t just put a file in a common place in your iDevice even if it is empty. You just can’t. It would be nice to store music that is available to all music players and not having to repeat those songs across them (like when you have both iTunesMusic and Google Music); or like when you download a PDF from a site and then you want it to be available when you are offline, or your movies, that’s a must.
The “Open in App” feature in iOS 8 solves the issue I described here, in some way, but it does, although the offline option is better.
So, I hope some of them become reality I like iDevices because of the way they are build, the materials and the design, but I still feel that iOS needs to improve to catch Android.
This are the real geniuses, we are just dumps standing on their shoulders.