Skip to content

Instantly share code, notes, and snippets.

View mujahidi's full-sized avatar

Mujahid Ishtiaq mujahidi

  • Pakistan
View GitHub Profile
@mujahidi
mujahidi / index.html
Created July 20, 2022 15:00
MP4 Full Width Video Wrapper
<!-- Change POSTER, MP4_URL, WEBM_URL and OGG_URL -->
<!-- Might need to add some height to main element -->
<div class="video-hero jquery-background-video-wrapper demo-video-wrapper">
<video class="jquery-background-video" autoplay muted loop poster="POSTER">
<source src="MP4_URL" type="video/mp4">
<source src="WEBM_URL" type="video/webm">
<source src="OGG_URL" type="video/ogg">
</video>
<div class="video-hero--content"></div>
</div>
/**
*
* Prerequisites:
* (1) All of your Gutenberg block Sass is in its own folder, or somewhere separated from the rest of your Sass. `components/blocks/*` is the location of the Sass in this example.
* (2) Your variables, mixins, functions, etc. are separated from the rest of your sass. Mixin/variables/function files DO NOT CONTAIN any styling whatsoever -- just definitions.
* (3) Do not use the class wp-block anywhere in your custom Gutenblock templates.
*
* Steps:
* 1. Create a new file, editor-style.scss, alongside your style.scss -- do not use an underscore to start filename as this is not a partial
* 2. Import your block Sass, your mixins, variables, and functions, as well as any external libraries, in patterns shown below
@mujahidi
mujahidi / vimeo-video.html
Last active November 23, 2021 21:06
Vimeo background video inside container
<div class="video-container">
<div class="another-container">
<iframe src="https://player.vimeo.com/video/VIMEO-ID?background=1" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>
</div>
<style>
.video-container{ height: 550px; overflow: hidden; }
.another-container{ height:0; overflow:hidden; position: relative; padding-bottom: 56.25%; /* 16:9 */ }
#mobile_video_container iframe{
@mujahidi
mujahidi / download-upload-file-folder-commands.txt
Last active March 4, 2019 20:57
Download/Upload file/folder through terminal commands
#Download File
scp user@host:/path/to/remote-file-to-download local-copy-of-file
#Download Folder
scp -r user@host:/path/to/remote-folder-to-download local-copy-of-folder
#Upload File
scp local-file user@host:/path/to/destination-where-local-file-is-uploaded
#Upload Folder