Skip to content

Instantly share code, notes, and snippets.

View mazhar266's full-sized avatar
💭
I may be slow to respond.

Mazhar Ahmed mazhar266

💭
I may be slow to respond.
View GitHub Profile
@mazhar266
mazhar266 / smooth-font.css
Created August 30, 2013 10:59
font smoothing in CSS3
body {
-webkit-font-smoothing: subpixel-antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-text-stroke: .2px;
}
@mazhar266
mazhar266 / bootstrap.css
Last active August 1, 2017 11:42
Media Query as Bootstrap
@media(max-width:767px){}
@media(min-width:768px){}
@media(min-width:992px){}
@media(min-width:1200px){}
@mazhar266
mazhar266 / select-protected.css
Created March 5, 2014 19:47
Prohibit text selection using CSS
.protected {
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
pointer: default;
cursor: default;
}
@mazhar266
mazhar266 / reset-this.css
Created March 20, 2014 14:01
Reset CSS Style of an Element
.reset-this {
animation : none;
animation-delay : 0;
animation-direction : normal;
animation-duration : 0;
animation-fill-mode : none;
animation-iteration-count : 1;
animation-name : none;
animation-play-state : running;
animation-timing-function : ease;

HTTP status codes

  • 100 "continue"
  • 101 "switching protocols"
  • 102 "processing"
  • 200 "ok"
  • 201 "created"
  • 202 "accepted"
  • 203 "non-authoritative information"
  • 204 "no content"

Step 1

Get a VPS that offers 2 or more IP addresses.

Step 2

From the WHM cPanel, find the menu item Service Configuration, select Apache Configuration and then click on Reserved IPs Editor.

Step 3

<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
@mazhar266
mazhar266 / ellipsis-fallback.js
Last active August 29, 2015 14:04
Limiting text with (...) in CSS
function shorten(text, maxLength) {
var ret = text;
if (ret.length > maxLength) {
ret = ret.substr(0,maxLength-3) + "...";
}
return ret;
}
@mazhar266
mazhar266 / index.html
Last active August 29, 2015 14:04
Responsive fix for Windows Mobile 8 (backward compatible)
<!-- beginning of the document -->
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- rest of the document -->
@mazhar266
mazhar266 / merge.js
Last active October 5, 2017 12:08
Merge more than one JSON objects into one object in Node.JS
/**
* @name merge
* @author Mazhar Ahmed
*
* this function will merge more than one json objects into one object
*
* @uses
* var object3 = merge(object1, object2);
*
*/