Monday, October 26, 2015

Bash alias to copy the current IP to clipboard

This alias uses the one defined in the previous post to copy it to the clipboard.
We grabbed the IP with this alias in your .profile file in your home directory

alias cip="ifconfig | grep 'inet ' | grep -v 127.0.0.1 | awk '{print \$2}'"

Now define another one called cipb below it with this code

alias cipb="cip | tr -d '\n' | pbcopy"

So now you should have this in your .profile file
alias cip="ifconfig | grep 'inet ' | grep -v 127.0.0.1 | awk '{print \$2}'"
alias cipb="cip | tr -d '\n' | pbcopy"

This uses the pbcopy function to copy the value of your cip alias into the clipboard.
The tr -d '\n' removes the line ending from it. This allows me to use it when pasting it into a command on the terminal.
There is also cbpaste to paste whats in the clipboard. We can do a lot with these two commands, fun to play around with them.

You can find me on twitter @LZAntal

Friday, October 9, 2015

Properly install PIL or Pillow on Ubuntu

After installing PIL or Pillow on ubuntu server you notice that it doesnt have support for png, jpg, and freetype fonts.
It's because it's missing the lib files that it compiles against. Run these to get full support for those types.
sudo apt-get install libjpeg-dev
sudo apt-get install libpng-dev
After they installed you have to make sure they are linked/installed properly into /usr/lib. It never did for me so I run these commands.
sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib
sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib
sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib
With that out of the way you are ready now to install PIL or Pillow and have full png, jpg and freetype support. To do that run this command.
sudo pip install Pillow

You can find me on twitter @LZAntal

Tuesday, September 29, 2015

Bash alias to get the current IP in the terminal on mac

When I test iOS apps with server API I need my dev machine's local IP. I am using it to start the devserver and in the iOS app to connect to that. 
I got tired of typing ifconfig, scroll to find it and then copy and paste it so I created an alias for it.
Add this to your ~/.profile 
alias cip="ifconfig | grep 'inet ' | grep -v 127.0.0.1 | awk '{print \$2}'"
After this restart the terminal or run 
source ~/.profile
Then all you have to do is type cip in the terminal to print your current IP

You can find me on twitter @LZAntal

Friday, September 25, 2015

Install python-ldap on Ubuntu server

Doing the usual to install python-ldap on ubuntu server

$ pip install python-ldap

Gave me this unpleasant

$ error: command 'gcc' failed with exit status 1
After some searching around it turns out that it needs the development files for python and openldap. Installing it still gave me missing module error, which was a missing cyrus sasl package.

Solution

Install all three of these packages before you install python-ldap

$ sudo apt-get install python-dev
$ sudo apt-get install libldap2-dev
$ sudo apt-get install libsasl2-dev
Once all that out of the way run
$ pip install python-ldap
Now you should have a working python-ldap install.

Tuesday, August 25, 2015

Get your Mars Boarding Pass

This is super awesome from NASA. You can submit your name to be taken to Mars in the next rover. You have until September 8th to submit your name. What makes it super cool is that at the end you get this sweet Boarding Pass.
So head over here and send your name to Mars :)


Monday, April 13, 2015

Disable java update checks

Well it happened again.That stupid java update window keeps popping up. It seems that every time I disable auto update check after a few weeks it gets re-enabled somehow.



After searching around i found a thread that recommends using this command at the terminal
sudo defaults write /Library/Preferences/com.oracle.java.Java-Updater JavaAutoUpdateEnabled -bool false

Lets see how long this will work. I do need java for android stuff so I can't just remove it, even though I would love to. If you have any other workaround ping me on twitter @LZAntal.

Wednesday, April 8, 2015

Great article on String theory disproved

Finally an honest and sincere article on the failure of string theory and the toll it took on science. It's not a new article but as I was studying and string theory came up I got pointed to this article.
Reading this and other articles from scientist makes me feel that hopefully new and actually prove able things will emerge and brain and finance power will be better distributed.

Look at the way the article starts:
Ladies and gentlemen, we have failed. As scientists and citizens, we have a singular duty to society to advance. String theory has become almost a religion to the physics community. We have become obsessed with the notion that it is the “best” answer. For the past thirty years it has been bent and reformed to satisfy new findings, instead of looking for a better answer; it has resulted in the restricted development of new theories by students and Theoretical Physicists, and has wasted the mental and tangible resources of the scientific community.
Now if that doesn't get you excited.... Then maybe this does:
From this point forward I hope you have the integrity to consider the obligations of a scientist to consider all things from a logical and methodical point of view. To harbor doubt in all things that cannot show consistent accuracy and precision. We have concluded that string theory is having ill effects on the advancement of theoretical physics and related branches of science, have explored some of its flaws and inconsistencies, and considered the toll it is taking on our science resources by monopolizing our finances and our brainpower. I feel confident leaving you with this mission and battle cry

Go ahead and read the whole article and get excited for science again.
http://www.examiner.com/article/string-theory-disproved-what-happens-next

Saturday, March 7, 2015

Mod Hippo #2

Well great. mod dev with java8 is a no go :/ Glad I am not wroking on my main dev machine. Now it's time to remove java 8 and install 7. But I am getting there  :D

Mod Hippo #1

Getting ready to write my first minecraft mod. My youngest son wants a hippo. Lets see what it takes to make it happen. I am almost an hour into it and still installing all the tools and libraries. Itching to start coding even though its java... I had my fair share of java coding and we don't get along very well :)

Thursday, January 1, 2015

3rd year of #1GAM begins

It is exciting to see how far #1GAM has come. This is going to be the 3rd year since it's creation. I am super excited to see all the devs who joined and continue to join. And of course all the games that were created because of it. Keep up the great work and keep building games. But above all make sure you have a ton of fun in the process :)  This past year was fantastic for me in gamedev-land even though I wasn't able to submit any games... BUT! I was working on some amazing things and the best of all I was using my game editor, game engine RaptorGL.


Look forward to seeing lots more devs joining and even more games submitted. If you need help or inspiration don't hesitate to reach out on twitter @LZAntal or on our reddit page OneGameAMonth.

Happy New Year! Happy New #1GAM Year!