// jQuery
$(document).ready(function() {
// code
})
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"
This article walks you through how to get the ID of any YouTube video.
You may be watching the video or just happened to visit a link to a video. The video ID will be located in the URL of the video page, right after the v=
URL parameter.
This file contains 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> | |
function myfunction($app) { | |
// ~~ Core. | |
// debug($app); | |
// dump($app); | |
// var_dump($app); | |
// ~~ Devel + kint library + settings | |
// dpr($app); | |
// kint($app); |
This file contains 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
{# ~ Core ~ #} | |
{# {{ dump() }} #} | |
{# {{ dump(page) }} #} | |
{# ~ Devel~ #} | |
{# {{ kint()}} #} | |
{# {{ kint(page)}} #} | |
{# {{ devel_dump(page) }} #} | |
{# {{ devel_breakpoint() }} #} |
This file contains 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 | |
/** | |
* Get Vimeo video id from url | |
* | |
* Supported url formats - | |
* | |
* https://vimeo.com/11111111 | |
* http://vimeo.com/11111111 |
This file contains 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 | |
// Here is a sample of the URLs this regex matches: (there can be more content after the given URL that will be ignored) | |
// http://youtu.be/dQw4w9WgXcQ | |
// http://www.youtube.com/embed/dQw4w9WgXcQ | |
// http://www.youtube.com/watch?v=dQw4w9WgXcQ | |
// http://www.youtube.com/?v=dQw4w9WgXcQ | |
// http://www.youtube.com/v/dQw4w9WgXcQ | |
// http://www.youtube.com/e/dQw4w9WgXcQ | |
// http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcQ |
Just migrated it from Codepen.io to markdown. Credit goes to David Conner.
Working with DOM | Working with JS | Working With Functions |
---|---|---|
Accessing Dom Elements | Add/Remove Array Item | Add Default Arguments to Function |
Grab Children/Parent Node(s) | Add/Remove Object Properties | Throttle/Debounce Functions |
Create DOM Elements | Conditionals |
Note: Unix-like systems only.
- Export your extensions to a shell file:
code --list-extensions | sed -e 's/^/code --install-extension /' > my_vscode_extensions.sh
NewerOlder