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
| var pauseId; | |
| // What the existing players c | |
| window.permitMainAudio = function(event) { | |
| if (!player.isPlaying()) { | |
| return true; | |
| } | |
| // event.location is info from source, ie YouTube | |
| if (event.source == 'video') { |
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
| jQuery.fn.offset = function( options ) { | |
| if ( arguments.length ) { | |
| return options === undefined ? | |
| this : | |
| this.each(function( i ) { | |
| jQuery.offset.setOffset( this, options, i ); | |
| }); | |
| } | |
| var box, docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft, top, left, |
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 "should import GitHub organizations after saving" do | |
| organization = Hashie::Mash.new(:id => 1991, :login => 'twitter') | |
| User.any_instance.stubs(:github_organizations).returns([organization]) | |
| user = User.make! | |
| assert_equal user.github_organizations.count, user.organizations.count | |
| end |
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> | |
| <title>Dope</title> | |
| <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script> | |
| <script> | |
| var timeout; | |
| $(function() { | |
| $('#fireButton').click(function(){ | |
| if (typeof timeout !== 'undefined') |
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> | |
| <title>Dope</title> | |
| <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script> | |
| <script type="text/javascript"> | |
| $(function() { | |
| var getPositions = function () { | |
| return { | |
| servo: $('#servo').val(), |
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
| <form action="url/servo.php?servo=0&position=<? echo $position; ?>" method="post"> | |
| <input type="range" min="0" max="180" value="0" step="1" onchange="showValue(this.value)" / style="width:75%; margin:100px auto;"> | |
| <input type="submit" name="button" /> | |
| </form> | |
| <span id="range">0</span> | |
| <script type="text/javascript"> | |
| function showValue(newValue) | |
| { |
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 | |
| include_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'_config.php'); | |
| include_once(dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'teleduino328_php.php'); | |
| if(isset($_SERVER['HTTP_HOST'])) | |
| { | |
| echo "<pre>"; | |
| } | |
| $Teleduino328PHP = new Teleduino328PHP(); |
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
| Testing |
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
| for i in *.m4a; do | |
| y=`echo "$i"|sed -e 's/.m4a/.mp3/'` | |
| ffmpeg -i "$i" -acodec libmp3lame -ab 192 -ac 2 "$y" | |
| done |
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
| # Public: Take the gem's runtime dependencies and install them from their remote source | |
| # | |
| # Returns nothing. | |
| # Raises GemGarage::MissingGemError if the gem file doesn't exist. | |
| def install_dependencies | |
| raise GemGarage::MissingGemError unless File.exists?(file_path) | |
| with_gem do |spec| | |
| spec.runtime_dependencies.each do |dependency| | |
| Resque.enqueue(GemGarage::Jobs::InstallDependency, rubygem.account_id, dependency.name, dependency.requirement) |