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
| # routes.rb | |
| match 'ads/:id/present/*path.:format', :to => 'ads#present' | |
| # ads_controller.rb | |
| def present | |
| @ad = Ad.find(params[:id]) | |
| path = "#{params[:path]}.#{params[:format]}" | |
| send_data(@ad.get_file(path), :filename => path, :disposition => 'inline') | |
| 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
| ubuntu@ip-10-93-169-71:~/www$ ffmpeg -codecs | |
| ffmpeg version N-64743-g162cffc Copyright (c) 2000-2014 the FFmpeg developers | |
| built on Jul 17 2014 22:56:46 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5) | |
| configuration: --prefix=/usr/local --enable-gpl --enable-version3 --enable-nonfree --enable-shared --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid | |
| libavutil 52. 92.101 / 52. 92.101 | |
| libavcodec 55. 69.100 / 55. 69.100 | |
| libavformat 55. 48.101 / 55. 48.101 | |
| libavdevice 55. 13.102 / 55. 13.102 | |
| libavfilter 4. 11.102 / 4. 11.102 | |
| libswscale 2. 6.100 / 2. 6.100 |
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 | |
| // set up variables | |
| $name = $comment = $error_string = ''; | |
| $errors = array(); | |
| // define success behavior | |
| function thanks(){ | |
| header('Location: thanks.html'); | |
| exit; | |
| } | |
| // was the form submitted? |
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 | |
| // Inlay template/page finder. | |
| ini_set('display_errors', 1); | |
| if(preg_match('/scan_folder\.php/', $_SERVER['REQUEST_URI']) || !isset($_POST['inlay_key']) || empty($_POST['inlay_key']) || ($_POST['inlay_key'] != '2f96deba74feb435ecf7f94f83f34c2c2')){ | |
| header("Status: 404 Not Found", true, 404); | |
| print 'Missing. Move along.'; | |
| exit; | |
| } | |
| $base = dirname(__FILE__); | |
| $pages = array(); |
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
| <folder-action name="com.wdstudio.inlay_folder" title="Inlay"> | |
| <action-version version="0.1"> | |
| Inlay Folder Action | |
| Collects the pages from your document for Inlay.io. | |
| (c)2014 Walter Davis Studio | |
| </action-version> | |
| <action-file var name="manifest"/> | |
| <action-javascript> | |
| if(!'test'.strip) String.prototype.strip = function() { | |
| return this.replace(/^\s+/, '').replace(/\s+$/, ''); |
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
| function complete_url(){ | |
| var site = fwDocument.fwWebAddress(); | |
| if(site.length < 1) | |
| fwAbort('Please set the Web Address in Document Setup before publishing'); | |
| var folder = fwPage.fwFolder; | |
| var path = new Array(fwPage.fwFileName); | |
| while(folder.fwFolder){ | |
| path.push(folder.toString()); | |
| folder = folder.fwFolder; | |
| } |
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 h = new Date().getHours(); | |
| var slots = $H({ | |
| morning: $R(4,11).toArray(), | |
| afternoon: $R(12,16).toArray(), | |
| evening: $R(17,23).toArray().concat($R(0,3).toArray()) | |
| }); | |
| slots.each(function(time){ | |
| if(time.value.include(h)){ | |
| if(!!$('video').readAttribute('poster')){ | |
| $('video').writeAttribute('poster', |
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
| marvin:sandbox waltd$ rails new test_app | |
| Using -d mysql -j prototype from /Volumes/eddy/Users/waltd/.railsrc | |
| create | |
| create README.rdoc | |
| create Rakefile | |
| create config.ru | |
| create .gitignore | |
| create Gemfile | |
| create app | |
| create app/assets/javascripts/application.js |
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 box = $('item1'); | |
| var tabs = box.select('h3'); | |
| var bodies = box.select('p,ul,table,dl'); | |
| var tabStyle = 'background-color:#ccc'; | |
| var tabSelected = 'background-color: #dd9' | |
| tabs.invoke('setStyle','font-size:0.9em; padding:0.3em 1em; ' + tabStyle + '; margin:0 1px 0 0; cursor:pointer'); | |
| bodies.each(function(elm){ | |
| elm.hide(); | |
| elm.setStyle('float:left; width:100%'); | |
| elm._tab = elm.previous('h3'); |
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 | |
| $sender_1 = 'a_real_user@your_server.com'; | |
| $sender_2 = 'a_real_user@a_different_server.com'; | |
| $recipient = 'you@your_email_server.com'; | |
| print 'Sending mail...'; | |
| mail($recipient, 'A test message', 'Sent by a local user', "From: $sender_1", "-f$sender_1"); | |
| mail($recipient, 'A test message', 'Sent by a remote user', "From: $sender_2", "-f$sender_2"); | |
| print 'Done!'; | |
| ?> |