Skip to content

Instantly share code, notes, and snippets.

View delowardev's full-sized avatar
🏠
Working from home

Delowar Hossain delowardev

🏠
Working from home
View GitHub Profile
@MikeRogers0
MikeRogers0 / resize-image.js
Last active May 14, 2024 03:41
An example of how to resize an image on the fly with javascript.
// The function that scales an images with canvas then runs a callback.
function scaleImage(url, width, height, liElm, callback){
var img = new Image(),
width = width,
height = height,
callback;
// When the images is loaded, resize it in canvas.
img.onload = function(){
var canvas = document.createElement("canvas"),
@juanbrujo
juanbrujo / sharebuttons.html
Last active December 14, 2021 07:19
lightweight share buttons with vanilla javascript
<a href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>" class="share facebook">Facebook</a>
<a href="https://twitter.com/intent/tweet?url=<?php the_permalink(); ?>&text=<?php the_title(); ?>&via=twitter" class="share twitter">Twitter</a>
<a href="https://plus.google.com/share?url=<?php the_permalink(); ?>" class="share google">Google+</a>
<a href="http://www.linkedin.com/shareArticle?mini=true&url=<?php the_permalink(); ?>&source=LinkedIn.com&title=<?php the_title(); ?>" class="share linkedin">LinkedIn</a>
@faressoft
faressoft / javascript_deep_dive.md
Last active April 17, 2024 18:50
JavaScript Deep Dive to Crack The JavaScript Interviews