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
| setInterval(function(){jQuery.ajax('YOUR-URL-TO-THE-THEME-FILE',{cache:false}).success(function(html){var btn=jQuery("div[data-action='update_preview']").first();if(html!=ace.edit('editor').getValue()){ace.edit('editor').setValue(html);if(!btn.hasClass('disabled'))btn.click()}});},1000); |
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
| #! /usr/bin/env bash | |
| ### | |
| # | |
| # install_mysql.sh | |
| # | |
| # This script assumes your Vagrantfile has been configured to map the root of | |
| # your application to /vagrant and that your web root is the "public" folder | |
| # (Laravel standard). Standard and error output is sent to | |
| # /vagrant/vm_build.log during provisioning. |
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
| convert test.gif test%05d.jpg | |
| ffmpeg -r NUMBER_OF_JPG_PICTURES_GENERATED -i test%05d.jpg -y -an test.avi |
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
| mogrify -resize 50% -format jpg * |
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
| mencoder -ss 00:30:00 -endpos 00:00:05 -oac copy -ovc copy originalfile -o newfile |
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
| class TwitterWidgetIdExtractor | |
| WIDGET_SETTING_URL = "https://twitter.com/settings/widgets/new/user?screen_name=" | |
| SIGNIN_URL = "https://twitter.com/login" | |
| attr_accessor :screen_name, :twitter_username, :twitter_password | |
| def initialize(screen_name, twitter_username, twitter_password) | |
| @screen_name = screen_name | |
| @twitter_username = twitter_username | |
| @twitter_password = twitter_password |
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
| // based on the math here: | |
| // http://math.stackexchange.com/a/1367732 | |
| // x1,y1 is the center of the first circle, with radius r1 | |
| // x2,y2 is the center of the second ricle, with radius r2 | |
| function intersectTwoCircles(x1,y1,r1, x2,y2,r2) { | |
| var centerdx = x1 - x2; | |
| var centerdy = y1 - y2; | |
| var R = Math.sqrt(centerdx * centerdx + centerdy * centerdy); | |
| if (!(Math.abs(r1 - r2) <= R && R <= r1 + r2)) { // no intersection |
OlderNewer