Skip to content

Instantly share code, notes, and snippets.

Shahrukh A. Khan Shaz3e

View GitHub Profile
@Shaz3e
Shaz3e / scroller-bottom.js
Created Mar 22, 2016
Detect Bottom on Scroll
View scroller-bottom.js
```
$(window).scroll(function(){
if($(window).scrollTop() + $(window).height() > $(document).height() - <?php echo( s3_option('s3cc_fixed_trigger') == '' ? 100 : s3_option('s3cc_fixed_trigger') );?>) {
$('.s3cc-fixed').css('position','static');
}else{
$('.s3cc-fixed').css('position','fixed');
}
});
```
@Shaz3e
Shaz3e / Display number of Facebook fans in full text
Created Jul 4, 2015
Display number of Facebook fans in full text
View Display number of Facebook fans in full text
If you have a Facebook page for your website or blog, you might want to display how many fans you have. This snippet will help you to get your Facebook fan count, in full text. Don’t forget to add your page ID on line 2.
View Detect browser language.md

If your website is multilingual, it can be useful to detect the browser language to use this language as the default. The code below will return the language used by the client’s browser.

@Shaz3e
Shaz3e / Remove Microsoft Word HTML tags
Created Jul 4, 2015
Remove Microsoft Word HTML tags
View Remove Microsoft Word HTML tags
When used, Microsoft Word creates lots of tags: font, span, style, class… These tags are useful inside Word itself, but when you paste a text from Word into a webpage, you’ll end up with lots of useless tags. Here’s a very handy function to remove all Word HTML tags.
@Shaz3e
Shaz3e / Download & save a remote image on your server
Created Jul 4, 2015
Download & save a remote image on your server
View Download & save a remote image on your server
Downloading an image on a remote server and saving it on your own server is useful when building websites, and it’s also very easy to do. The two lines of code below will do it for you.
View Create Data URI’s
Data URI’s can be useful for embedding images into HTML/CSS/JS to save on HTTP requests. The following function will create a Data URI based on $file for easier embedding.
@Shaz3e
Shaz3e / Auto convert URL into clickable hyperlink
Created Jul 4, 2015
Auto convert URL into clickable hyperlink
View Auto convert URL into clickable hyperlink
@Shaz3e
Shaz3e / Find All Links on a Page
Created Jul 4, 2015
Find All Links on a Page
View Find All Links on a Page
@Shaz3e
Shaz3e / Extract keywords from a webpage
Created Jul 4, 2015
Extract keywords from a webpage
View Extract keywords from a webpage
The title said it all: A great code snippet to easily extract meta keywords from any webpage.
@Shaz3e
Shaz3e / Find out if your email has been read
Last active Aug 29, 2015
Find out if your email has been read
View Find out if your email has been read
When sending emails, you might want to be able to find out if your email has been read. Here’s a very interesting snippet which log the IP address which read your email, as well as the actual date and time.
You can’t perform that action at this time.