A friend shared this site with me and it’s a great resource if you’re developing in HTML5. It shows a list of all the new features and which you’re safe to use for browsers.
A friend shared this site with me and it’s a great resource if you’re developing in HTML5. It shows a list of all the new features and which you’re safe to use for browsers.
So on today’s task list at work I am going through 1,000+ files and renaming them to no longer be camel case. After about 2 minutes of this I decide, what a waste of time to do manually! So I did some searching on the tubes and found this article on Linux Journal.
It shows this very simple shell script! All you have to do is throw this in text wrangler/editor, save as a .sh then cd to the directory where your files are and run the script. It will ask you if you want to overwrite each file, which at first I was a little annoyed by but in reality it’s good to get a visual check on each file to make sure it’s doing what you want before overwriting.
There are some other ways to do this process in the comments of the article, and you should take note Phil wrote this quite a few years ago and it doesn’t take into consideration files with spaces, but for my purposes it worked great!!!
#!/bin/sh # lowerit # convert all file names in the current directory to lower case # only operates on plain files--does not change the name of directories # will ask for verification before overwriting an existing file for x in `ls` do if [ ! -f $x ]; then continue fi lc=`echo $x | tr '[A-Z]' '[a-z]'` if [ $lc != $x ]; then mv -i $x $lc fi done
I’ve been learning how to do things in Terminal (OSX Command Line app) the last few months and have either looked these up on the web or asked team members how to do these things. I’ve been keeping them written on a notepad at my desk up until now but they’re becoming scattered so I thought I’d just keep everything in a blog post so others can reference too.
db connect to database (after setting this up in .bash_profile, and .bash_aliases. Just quicker than typing mysql)
ls list
\. filepath.sql add sql to database
ctrl A go to beginning of line
ctrl K clear the line
\q exits db
\u or use switches the database you’re using when followed with the db’s name
cd change directory
php filename.php = run php script
ln -s = symbolic link
scp = secure copy
sudo /usr/sbin/apachect/ restart restarts apache
You can also restart apache in OSX by going to System Preferences > Sharing > Uncheck “Web Sharing” then recheck the box.
This list is by no means complete! These are just a few that I’ve found useful/used often and recently learned.
I was invited to shoot some still photography at a film set this weekend for “Ego Claw”. Unfortunately I was only able to shoot for a very short amount of time, as I busted a rim on my front tire in a HUGE pothole on my way to the set. So I had to sit at the shop while it was sort of (not really) getting fixed. I was there for about two hours and was very impressed with all the action that was going on! They had a really well choreographed fight scene, and some things they quickly re-choreographed as they were going. I had to leave at midnight (not unlike Cinderella) but later found out these guys kept shooting past 3am!




