This Gist: http://is.gd/dokkudjango
DigitalOcean: https://www.digitalocean.com/
Dokku: https://github.com/progrium/dokku
Dokku-Postgres: https://github.com/Kloadut/dokku-pg-plugin
| <?php | |
| /* | |
| Author: Hans2103 | |
| credit: Jim Westergren, Jeedo Aquino & Flynsarmy | |
| File: index-with-redis.php | |
| Updated: 2013-05-27 | |
| This is a redis caching system for Wordpress based on Redis connection using PHPRedis. | |
| https://github.com/nicolasff/phpredis |
| // clear canvas | |
| canvas.clear(); | |
| // add red rectangl | |
| canvas.add(new fabric.Rect({ | |
| width: 50, height: 50, left: 50, top: 50, fill: 'rgb(255,0,0)' | |
| })); | |
| canvas.add(new fabric.Rect({ | |
| width: 50, height: 50, left: 110, top: 50, fill: 'rgb(255,0,0)' |
This Gist: http://is.gd/dokkudjango
DigitalOcean: https://www.digitalocean.com/
Dokku: https://github.com/progrium/dokku
Dokku-Postgres: https://github.com/Kloadut/dokku-pg-plugin
| // Bootstrap Mid-Small - col-ms-* - the missing grid set for Bootstrap3. | |
| // | |
| // This is a hack to fill the gap between 480 and 760 pixels - a missing range | |
| // in the bootstrap responsive grid structure. Use these classes to style pages | |
| // on cellphones when they transition from portrait to landscape. | |
| // | |
| // NOTE: Here I use SASS instead of LESS for styling. To convert to LESS | |
| // replace '$screen' with '@screen' and '$grid' with '@grid'. | |
| // | |
| // See https://github.com/twbs/bootstrap/issues/10203 for more info. |
| # Logging settings for django projects, works with django 1.5+ | |
| # If DEBUG=True, all logs (including django logs) will be | |
| # written to console and to debug_file. | |
| # If DEBUG=False, logs with level INFO or higher will be | |
| # saved to production_file. | |
| # Logging usage: | |
| # import logging | |
| # logger = logging.getLogger(__name__) | |
| # logger.info("Log this message") |
| var request = require('request'); | |
| cheerio = require('cheerio'); | |
| util = require('util'); | |
| http = require('http'); | |
| cronJob = require('cron').CronJob; | |
| var data = new Array(); | |
| new cronJob('*/15 * * * * *', function(){ | |
Web fonts are pretty much all the rage. Using a CDN for font libraries, like TypeKit or Google Fonts, will be a great solution for many projects. For others, this is not an option. Especially when you are creating a custom icon library for your project.
Rails and the asset pipeline are great tools, but Rails has yet to get caught up in the custom web font craze.
As with all things Rails, there is more then one way to skin this cat. There is the recommended way, and then there are the other ways.
Here I will show how to update your Rails project so that you can use the asset pipeline appropriately and resource your files using the common Rails convention.
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.