This file contains hidden or 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
This is an example of an event loop server in node.js |
This file contains hidden or 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
Person you = GetCurrentPerson(); | |
//life motto | |
if (you.Mood == MoodState.Sad) | |
{ | |
// stop being sad | |
you.Mood = MoodState.Awesome; | |
}; | |
This file contains hidden or 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
@{ | |
var todaysDate = DateTime.Now.DayOfWeek.Year; | |
} |
This file contains hidden or 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
fs.readFile('/etc/hosts', function(err, contents) { | |
console.log('contents'); | |
}); | |
// same as below | |
var callback = function(err, contents) { | |
console.log(contents); | |
} | |
fs.readFile('/etc/hosts', callback); |
This file contains hidden or 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
"The most valuable thing you can make is a mistake - you can't learn anything from being perfect" | |
- Adam Osborn |
This file contains hidden or 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
/* Corner radius */ | |
.ui-corner-all, | |
.ui-corner-top, | |
.ui-corner-left, | |
.ui-corner-tl { | |
border-top-left-radius: 5px; | |
} | |
.ui-corner-all, | |
.ui-corner-top, | |
.ui-corner-right, |
This file contains hidden or 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
@font-face { | |
[font-family: <family-name>;]? | |
[src: [ <uri> [format(<string>#)]? | <font-face-name> ]#;]? | |
[unicode-range: <urange>#;]? | |
[font-variant: <font-variant>;]? | |
[font-feature-settings: normal|<feature-tag-value>#;]? | |
[font-stretch: <font-stretch>;]? | |
[font-weight: <weight>]; | |
[font-style: <style>]; | |
} |
This file contains hidden or 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
//t: current time, b: begInnIng value, c: change In value, d: duration jQuery.easing['jswing'] = jQuery.easing['swing']; | |
jQuery.extend( jQuery.easing, { def: 'easeOutQuad', swing: function (x, t, b, c, d) { | |
//alert(jQuery.easing.default); | |
return jQuery.easing[jQuery.easing.def](x, t, b, c, d); | |
}, | |
easeInQuad: function (x, t, b, c, d) { | |
return c*(t/=d)*t + b; | |
}, | |
easeOutQuad: function (x, t, b, c, d) { | |
return -c *(t/=d)*(t-2) + b; |
This file contains hidden or 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
/*Setup WOW.js | |
1 | |
Link to the CSS animation library | |
Link to Animate.css | |
(You can link to another CSS animation library by changing WOW.js settings) | |
<link rel="stylesheet" href="css/animate.css"> |
This file contains hidden or 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 only these four selectors and the load speed won't cost you too much: | |
_________________________________________________________________________ | |
************************************************************************* | |
Position- transform: translate(npx, npx); | |
Scale- transform: scale(n); | |
Rotation- transform: rotate(ndeg); | |
Opacity- opacity: 0...1; |