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
everyone.forEach(function(person) { | |
if (person === you) person.inviteFriends(); | |
person.go(); | |
}); | |
console.log('Все идут!'); |
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
## Public API | |
module.exports = | |
# <code>span()</code> formats the time span between now and the date specified in a "Facebook way". | |
# | |
# Examples: | |
# | |
# May 18, 2011 at 5:11AM | |
# December 25 at 8:43PM | |
# Friday at 3:53PM |
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
fs = require "fs" | |
path = require "path" | |
rmdir = (dir) -> | |
list = fs.readdirSync dir | |
for item in list | |
filename = path.join dir, item | |
stat = fs.statSync filename | |
if filename in [".", ".."] | |
# Skip |
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
upstream pet_project { | |
server localhost:3000; | |
} | |
server { | |
listen 80; | |
server_name pet-project.myhost; | |
location / { | |
alias /opt/demo/pet-project/public/; |
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
fs = require "fs" | |
inFile = process.argv[2] # Read the input file name from the 1st command line parameter. | |
outFile = process.argv[3] # Read the output file name from the 2nd optional command line parameter. | |
fs.readFile inFile, "utf8", (err, data) -> # Read the input file content. | |
if err | |
console.log err # Log error to console. | |
else | |
try |
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
upstream pet_project { | |
server localhost:3000; | |
} | |
server { | |
listen 80; | |
server_name frontend; | |
location /demo/pet-project { | |
alias /opt/demo/pet-project/public/; |
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
package { | |
import flash.display.InteractiveObject; | |
import flash.events.EventDispatcher; | |
import flash.events.FocusEvent; | |
import flash.events.TimerEvent; | |
import flash.geom.Point; | |
import flash.utils.Timer; | |
import mx.collections.ArrayCollection; |
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
AuthenticationManager.instance.authenticate(usernameTextInput.text, passwordTextInput.text); |
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
package { | |
internal class AuthenticationManagerInstance extends EventDispatcher { | |
public function AuthenticationManagerInstance() { | |
super(); | |
} | |
public function authenticate(username : String, password : String) : void { | |
// Authentication routine. |
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
package { | |
public class AuthenticationManager { | |
public static var instance : AuthenticationManagerInstance = new AuthenticationManagerInstance(); | |
} | |
} |
NewerOlder