This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* How to use it in html: | |
* <img src='http://www.example.com/images/hi.jpg' onerror='imageNotFound(this);'> | |
*/ | |
function imageNotFound(image) { | |
image.onerror = ""; | |
image.src = "../images/no-image.png"; | |
return true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log(JSON.stringify(obj, null, 2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Use it in pug | |
* | |
* .fieldset | |
* h1.legend(translate="html") sync-title | |
* | |
*/ | |
.fieldset{ | |
// height: 100px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Use it in pug: | |
* | |
* span.fa-stack.combined-icons | |
* i.fa.fa-map.fa-stack-2x.awesomeEntity | |
* i.fa.fa-heartbeat.fa-stack-1x.awesomeAction | |
*/ | |
.combined-icons{ | |
display: block; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Add this for jalali calendar: | |
* <script src="http://rawgithub.com/babakhani/PersianDate/master/dist/0.1.8/persian-date-0.1.8.min.js"> | |
* | |
*/ | |
var dateSeperatorCharacter = '-'; | |
function currentDateTime(){ | |
var cdt = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Aliases added by Ashkan ------------------------------- | |
# | |
# Must install jcal | |
alias acal="echo '';echo '';jcal -3 -e; cal -3;echo '';echo '';date '+%A %Y/%B/%d %H:%M:%S%n';jdate '+%A %Y/%B/%d %H:%M:%S%n';" | |
# End of aliases added by Ashkan ------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String.prototype.replaceAt=function(index, character) { | |
return this.substr(0, index) + character + this.substr(index+character.length); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# در ترمینال ------------------------------- | |
# Ctrl + a یا Home رفتن به اول سطر | |
# Ctrl + k پاک کردن از جای فعلی تا آخر سطر | |
# Ctrl + u پاک کردن از جای فعلی تا اول سطر | |
# Ctrl+a Ctrl+k پاک کردن تمام سطر | |
# Ctrl + e یا End رفتن به آخر سطر | |
# Ctrl + Alt + Delete رستارت سیستم | |
# Ctrl + l پاک کردن کل ترمینال به غیر از خطی که در آن هستیم |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ---- when bootstrap modal pushes body to the left ------- */ | |
body { | |
margin: 0 !important; | |
padding: 0 !important; | |
} | |
/* unset bs3 setting */ | |
.modal-open { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.pulse { | |
// margin:100px; | |
display: block; | |
width: 2px; | |
height: 2px; | |
border-radius: 50%; | |
background: transparent; | |
cursor: pointer; |
OlderNewer