Skip to content

Instantly share code, notes, and snippets.

View smjuber's full-sized avatar
🙂
A Believer n Selectively Social

Mehadi Hasan Juber smjuber

🙂
A Believer n Selectively Social
View GitHub Profile
https://www.facebook.com/sharer.php?u={url}
https://www.facebook.com/dialog/share?app_id={app_id}&display={page_type}&href={url}&redirect_uri={redirect_url}
https://reddit.com/submit?url={url}&title={title}
https://twitter.com/intent/tweet?url={url}&text={title}&via={user_id}&hashtags={hash_tags}
https://www.linkedin.com/sharing/share-offsite/?url={url}
https://api.whatsapp.com/send?phone={phone_number}&text={title}%20{url}
https://www.tumblr.com/widgets/share/tool?canonicalUrl={url}&title={title}&caption={text}&tags={hash_tags}
http://pinterest.com/pin/create/button/?url={url}
https://www.blogger.com/blog-this.g?u={url}&n={title}&t={text}
https://www.evernote.com/clip.action?url={url}&title={title}
@smjuber
smjuber / script.js
Last active September 21, 2020 20:37
hide a HTML5 video when it finishes playing
onended="videoEnded()";
// To your video tag, and then just have a function videoEnded() hide the video.
// Or with just a jQuery function… I'm writing this without testing, so hopefully it will work-
$('video').on('ended',function(){ $(this).hide(); });
// Thanks, Ended up getting it working with this:
$('#vid2').hide();
$('#vid1').on('ended',function(){
@smjuber
smjuber / repair-mysql-data.ps1
Created October 28, 2020 16:59 — forked from josemmo/repair-mysql-data.ps1
Repair MySQL data directory (for XAMPP)
# Based on this answer: https://stackoverflow.com/a/61859561/1956278
# Backup old data
Rename-Item -Path "./data" -NewName "./data_old"
# Create new data directory
Copy-Item -Path "./backup" -Destination "./data" -Recurse
Remove-Item "./data/test" -Recurse
$dbPaths = Get-ChildItem -Path "./data_old" -Exclude ('mysql', 'performance_schema', 'phpmyadmin') -Recurse -Directory
Copy-Item -Path $dbPaths.FullName -Destination "./data" -Recurse