Skip to content

Instantly share code, notes, and snippets.

Avatar

Shahrukh A. Khan Shaz3e

View GitHub Profile
@Shaz3e
Shaz3e / readme.md
Last active April 30, 2023 15:01
5 Commands to add an existing project to GitHub
View readme.md

Use the following command to initialize the repository

> git init

Use the following command to index repository

> git add .
@Shaz3e
Shaz3e / loader.css
Created August 29, 2021 19:32
Loading Effect
View loader.css
#overlay{
position:fixed;
z-index:99999;
top:0;
left:0;
bottom:0;
right:0;
background:rgba(255,255,255,1);
transition: 1s 0.4s;
}
@Shaz3e
Shaz3e / scroller-bottom.js
Created March 22, 2016 20:18
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 July 4, 2015 22:18
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.
@Shaz3e
Shaz3e / Detect browser language.md
Created July 4, 2015 22:17
Detect browser language
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 July 4, 2015 22:17
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 July 4, 2015 22:16
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.
@Shaz3e
Shaz3e / Create Data URI’s
Created July 4, 2015 22:15
Create Data URI’s
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 July 4, 2015 22:14
Auto convert URL into clickable hyperlink
View Auto convert URL into clickable hyperlink
@Shaz3e
Shaz3e / Find All Links on a Page
Created July 4, 2015 22:13
Find All Links on a Page
View Find All Links on a Page