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 parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
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 | |
| $api_key = "YOUR_API_KEY"; | |
| $list_id = "YOUR_LIST_ID"; | |
| require('Mailchimp.php'); | |
| $Mailchimp = new Mailchimp( $api_key ); | |
| $Mailchimp_Lists = new Mailchimp_Lists( $Mailchimp ); | |
| $subscriber = $Mailchimp_Lists->subscribe( $list_id, array( 'email' => htmlentities($_POST['email']) ) ); | |
| if ( ! empty( $subscriber['leid'] ) ) { |
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(){ | |
| var | |
| lists = $('.product-list'), | |
| services = '/services/get-complete-product-vo.jsp', | |
| n = 2; | |
| lists.each( eachList ); | |
| function eachList(idx, ul){ |
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
| Event = (function(){ | |
| try { | |
| var p = new CustomEvent('c', { detail: { foo: 'b' } }); | |
| if('c' === p.type && 'b' === p.detail.foo) | |
| return CustomEvent; | |
| } catch (e) { | |
| return 'function' === typeof document.createEvent ? function(type, params) { | |
| var e = document.createEvent('CustomEvent'); | |
| params = params || {}; |
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
| " ======================================= | |
| " .vimrc file | |
| " ======================================= | |
| " | |
| " My default config and plugins for vim :) | |
| " Weslley Araujo <http://github.com/weslleyaraujo> | |
| " ======================================= | |
| " ======================================= | |
| " My default configs |
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
| (new Function('return ' + object))() |
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
| /* | |
| Use case: | |
| template = $('#template'); | |
| merge({ name :'My name'}, template.html()); // <div>My name</div> | |
| <script type="text/html"> | |
| <div>#{name}</div> | |
| </script> | |
| */ |
NewerOlder