(Ruby) Ruby on Rails doodles
Create new Ruby-on-Rails project. By default RoR comes with SQLite support, unless you state otherwise (-d mysql).
Create new Ruby-on-Rails project. By default RoR comes with SQLite support, unless you state otherwise (-d mysql).
Here’s how you can make a super simple slideshow that changes slides on a timer interval. You could easily edit it so any other event, like a mouse click, will trigger the slide() function. You can see it in action HERE HTML CSS jQuery And of course you could make this dynamic by spitting out… Read More »
Sometimes you might want to group form elements in arrays. Here’s a way to do that: The structure of the $_POST array will then be:
I needed to center a div with dynamic content, so I couldn’t set a fixed width. Since margin: 0 auto; really won’t do anything if the element doesn’t have a fixed width you can solve it like this: HTML CSS
Here is a simple tutorial script that uploads a file to a folder on the server. In this example it is assumed that the file is an image and it will be outputted on screen in an img-tag. But the file uploading mechanics works for any file type.
Sometimes when you share a link to you site on Facebook it uses old thumbnails for the link image. There’s a ton of useful info about your site here: https://developers.facebook.com/tools/debug
A nice feauture in CSS3 is the box-shadow. Instead of working with tedious PNG-images you can add shadows to any element with the CSS property box-shadow. The syntax works like this: box-shadow: <offset-x> <offset-y> <blur> <spread> <color> <inset> The offset settings will set the angle of the shadow. Where it will be cast in relation to… Read More »
Here is a super simple navigation bar. Customize it for your site, with colors and fonts. This is just a super simple base recipe: First the html:
Here’s a simple way to paginate when getting large amounts of posts from the database.
Here’s a great tool for generating dummy data for your database etc. www.generatedata.com