To setup your computer to work with *.dev domains, e.g. project.dev, awesome.dev and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion
To setup your computer to work with *.dev domains, e.g. project.dev, awesome.dev and so on, without having to add to your hosts file each time.
| -- that is very similar to that of pandoc's HTML writer. | |
| -- There is one new feature: code blocks marked with class 'dot' | |
| -- are piped through graphviz and images are included in the HTML | |
| -- output using 'data:' URLs. | |
| -- | |
| -- Invoke with: pandoc -t sample.lua | |
| -- | |
| -- Note: you need not have lua installed on your system to use this | |
| -- custom writer. However, if you do have lua installed, you can | |
| -- use it to test changes to the script. 'lua sample.lua' will |
| #!/bin/bash | |
| # usage : | |
| # generate-iOS-app-icons.sh someDir/sourceImage-1024x1024.png path/where/ImagesAssets/is/located | |
| mkdir -p generated | |
| # you'll have to delete this one after executing the script if you copy the generated images in the Images asset | |
| SOURCE_ICON="$1" | |
| PATH_TO_IMAGES_ASSET="$2" |
| (function( $ ) { | |
| $.fn.simulateDragDrop = function(options) { | |
| return this.each(function() { | |
| new $.simulateDragDrop(this, options); | |
| }); | |
| }; | |
| $.simulateDragDrop = function(elem, options) { | |
| this.options = options; | |
| this.simulateEvent(elem, options); | |
| }; |
When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.
Raw Attribute Strings
<div my-directive="some string" another-param="another string"></div>| // From http://baagoe.com/en/RandomMusings/javascript/ | |
| function Alea() { | |
| return (function(args) { | |
| // Johannes Baagøe <[email protected]>, 2010 | |
| var s0 = 0; | |
| var s1 = 0; | |
| var s2 = 0; | |
| var c = 1; | |
| if (args.length == 0) { |
| <!DOCTYPE html> | |
| <html manifest="manifest.appcache.php"> | |
| <head> | |
| <title>AppCache Demo</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0rc1/jquery.mobile-1.0rc1.min.css" /> | |
| <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script> | |
| <script src="http://code.jquery.com/mobile/1.0rc1/jquery.mobile-1.0rc1.min.js"></script> |
| # Bash snippet to open new shells in most recently visited dir. | |
| # Useful if you want to open a new terminal tab at the present | |
| # tab's location. | |
| # | |
| # Put this in your .bashrc or whatever. | |
| pathed_cd () { | |
| if [ "$1" == "" ]; then | |
| cd | |
| else |
| # app_helper | |
| def callback_attribute | |
| %{ callbackurl="#{url_for(request.path) + "?_method=GET&" + request.query_string}" } | |
| end | |
| # in the view | |
| <fb:comments xid="m_story_<%= @first.id %>_comments" canpost="true" candelete="false" showform="true" numposts="5" publish_feed="false" simple="true" reverse="true" returnurl="<%= link_to_app "item/#{@first.id}" %>" <%= callback_attribute %>> | |
| <fb:title> <%= @first.couple_name %></fb:title> | |
| </fb:comments> |
| # app_helper | |
| def callback_attribute | |
| if request.env['PATH_INFO'] | |
| " callbackurl='#{link_to_app(request.env['PATH_INFO'])}?_method=GET' " | |
| end | |
| end | |
| # in the view | |
| <fb:comments xid="m_story_<%= @first.id %>_comments" canpost="true" candelete="false" showform="true" numposts="5" publish_feed="false" simple="true" reverse="true" returnurl="<%= link_to_app "item/#{@first.id}" %>" <%= callback_attribute %>> | |
| <fb:title> <%= @first.couple_name %></fb:title> |