This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset=utf-8> | |
| <title>HTML 5 Template</title> | |
| <link rel="stylesheet" href="style.css"> | |
| </head> | |
| <body> | |
| <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script> | |
| </body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # bash | |
| gem install populator | |
| gem install faker | |
| rake db:populate | |
| # lib/tasks/populate.rake | |
| namespace :db do | |
| desc "Erase and fill database" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "comments": 0, | |
| "comments_url": "https://api.github.com/gists/5526285/comments", | |
| "commits_url": "https://api.github.com/gists/5526285/commits", | |
| "created_at": "2013-05-06T16:38:54Z", | |
| "description": "#126 Populating a Database", | |
| "files": { | |
| "populating_database.rb": { | |
| "content": "# bash\n\ngem install populator\ngem install faker\nrake db:populate\n\n# lib/tasks/populate.rake\n\nnamespace :db do\n desc \"Erase and fill database\"\n task :populate => :environment do\n require 'populator'\n require 'faker'\n \n [Category, Product, Person].each(&:delete_all)\n \n Category.populate 20 do |category|\n category.name = Populator.words(1..3).titleize\n Product.populate 10..100 do |product|\n product.category_id = category.id\n product.name = Populator.words(1..5).titleize\n product.description = Populator.sentences(2..10)\n product.price = [4.99, 19.95, 100]\n product.created_at = 2.years.ago..Time.now\n end\n end\n \n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <Foundation/Foundation.h> | |
| // Determine the move in which a LOGO turtle crosses a point that it has already visited | |
| BOOL isBetween(int valueToTest, int limitOne, int limitTwo) { | |
| if (limitOne > limitTwo) { | |
| return (limitTwo <= valueToTest && valueToTest <= limitOne); | |
| } else { | |
| return (limitOne <= valueToTest && valueToTest <= limitTwo); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| override func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) { | |
| // instead of return perhaps should do a simpler animation | |
| if !tableView.dragging || indexPath.row == movies.count { return } | |
| let mvCell = cell as! MovieTableViewCell | |
| if toTop { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .popup { | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| bottom: 0; | |
| right: 0; | |
| display: block; | |
| text-align: center; | |
| margin: 0 auto; | |
| color: #f0c600; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| input:checked ~ .content { | |
| -webkit-filter: blur(30px); | |
| filter: blur(30px); | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Create a RAM disk with same perms as mountpoint | |
| # Script based on http://itux.idev.pro/2012/04/iservice-speed-up-your-xcode-%D0%BD%D0%B5%D0%BA%D0%BE%D1%82%D0%BE%D1%80%D1%8B%D0%B5-%D1%81%D0%BF%D0%BE%D1%81%D0%BE%D0%B1%D1%8B/ with some additions | |
| # Usage: sudo ./xcode_ramdisk.sh start | |
| USERNAME=$(logname) | |
| TMP_DIR="/private/tmp" | |
| RUN_DIR="/var/run" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "user_avatar": "http://placehold.it/32/4597CE/F7E42D/&text=FS", | |
| "user_iniciais": "FS", | |
| "user_fullname": "Frank Simpson", | |
| "user_name": { | |
| "last": "Simpson", | |
| "first": "Frank" | |
| }, |