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
| """ | |
| check out http://kushalvyas.github.io/gen_8Q.html#gen_8Q | |
| @file : queens.py | |
| Illustration of 8 queens using GA - evolution | |
| """ | |
| import numpy as np |
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
| <?php | |
| /** | |
| * deploy.php by Hayden Schiff (oxguy3) | |
| * Available at https://gist.github.com/oxguy3/70ea582d951d4b0f78edec282a2bebf9 | |
| * | |
| * No rights reserved. Dedicated to public domain via CC0 1.0 Universal. | |
| * See https://creativecommons.org/publicdomain/zero/1.0/ for terms. | |
| */ | |
| // random string of characters; must match the "Secret" defined in your GitHub webhook |
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
| /** | |
| * Implements whitelisting on host name | |
| */ | |
| public class SaferWebViewClient extends WebViewClient { | |
| private String[] hostsWhitelist; | |
| public SaferWebViewClient(String hostsWhitelsit){ | |
| super(); | |
| this.hostsWhitelist = hostsWhitelist; |
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.
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
| # Test the result of config.assets.precompile | |
| # | |
| # Check which files will be regarded as "manifests" and thus precompiled and be | |
| # available for standalone use via the /assets/<asset> URL when in production. | |
| # Execute this code in your Rails console. | |
| # First, you'll probably be in development mode, so add here your | |
| # additional production precompile patterns you want to test against. | |
| precompile = Rails.configuration.assets.precompile + [/^.+\.css$/, 'active_admin.js'] |