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
| app.get('/crontask', function(req, res) { | |
| var sender = new SendGrid.SendGrid('user','key'); | |
| sender.send({ | |
| to: '[email protected]', | |
| from: '[email protected]', | |
| subject: 'test mail', | |
| text: 'This is a sample email message.' | |
| }); | |
| }); |
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
| public class AccountController : Controller | |
| { | |
| // | |
| // GET: /Account/Login | |
| public ActionResult Login() | |
| { | |
| // Build the Return URI form the Request Url | |
| var redirectUri = new UriBuilder(Request.Url); | |
| redirectUri.Path = Url.Action("FbAuth", "Account"); |
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 WebSocketServer = require('ws').Server | |
| , wss = new WebSocketServer({port: process.env.PORT}); | |
| wss.on('connection', function(ws) { | |
| ws.on('message', function(message) { | |
| console.log('received: %s', message); | |
| }); | |
| ws.send('something'); | |
| }); |
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
| $('a.pjax').pjax('#main') | |
| $('#main') | |
| .on('pjax:start', function() { $('#loading').show() }) | |
| .on('pjax:end', function() { $('#loading').hide() }) |
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
| <phone:WebBrowser x:Name="webBrowser1" IsScriptEnabled="True"></phone:WebBrowser> |
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
| $(document).ready(function() { | |
| // Add the function to run after FB is initialized | |
| $(document).on('fb:initialized', function() { | |
| FB.getLoginStatus(fbAuthStatusChange); | |
| }); | |
| $(document).fb('youappid'); | |
| }); | |
| function fbAuthStatusChange(request) { | |
| // Do something |
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
| public class Location { | |
| public int Id { get; set; } | |
| public string Name { get; set; } | |
| public DbGeography Coordinates { get; set; } | |
| } |
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
| public ActionResult FacebookCallback(string code) | |
| { | |
| var fb = new FacebookClient(); | |
| dynamic result = fb.Post("oauth/access_token", new | |
| { | |
| client_id = "your_app_id_here", | |
| client_secret = "your_app_secret_here", | |
| redirect_uri = RedirectUri.AbsoluteUri, | |
| code = code | |
| }); |
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
| /** | |
| * WordPress Database Table prefix. | |
| * | |
| * You can have multiple installations in one database if you give each a unique | |
| * prefix. Only numbers, letters, and underscores please! | |
| */ | |
| $table_prefix = 'wp2_'; |
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
| :: 3. Build DocPad Site | |
| echo Building the DocPad site | |
| pushd %DEPLOYMENT_TARGET% | |
| call %DEPLOYMENT_TARGET%\node_modules\.bin\docpad.cmd generate | |
| IF !ERRORLEVEL! NEQ 0 goto error |