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
'C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>vbc.exe /t:exe /out:.\MyOutFileName.exe inputfilename.vb | |
' Allow easy reference to the System namespace classes. | |
Imports System | |
' This module houses the application's entry point. | |
Public Module modmain | |
' Main is the application's entry point. | |
Sub Main() | |
' Write text to the console. | |
Console.WriteLine ("Hello World using Visual Basic!") |
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
<!doctype html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> | |
<!--[if IE]><script src="excanvas.js"></script><![endif]--> | |
<script src="mood_chart.js"></script> | |
</head> | |
<body> | |
</body> | |
</html> |
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
import SimpleHTTPServer,SocketServer | |
H = SimpleHTTPServer.SimpleHTTPRequestHandler | |
d = SocketServer.TCPServer(("", 80), H) | |
d.serve_forever() |
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
Presenter = function() { | |
this.initialize(); | |
} | |
Presenter.extend = Backbone.View.extend | |
_.extend(Presenter.prototype, Backbone.Events, { | |
initialize: function () {} | |
}) |
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
class Point { | |
Point(this.x, this.y); | |
distanceTo(Point other) { | |
var dx = x - other.x; | |
var dy = y - other.y; | |
return Math.sqrt(dx * dx + dy * dy); | |
} | |
var x, y; | |
} |
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
main() { | |
var incMaker = () { | |
var x = 0; | |
var inc = () { | |
x += 1; | |
return x; | |
}; | |
return inc; | |
}; | |
var inc = incMaker(); |
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
server.setUpSocket(socket) -> | |
socket.on "data", (data) -> | |
server.allData.push(data) | |
#----------------- | |
server.setUpSocket(socket) -> | |
socket.on "data", _.bind(server.onSocketData, null, socket) |
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
#first generate a key for your domain | |
openssl genrsa -out yourdomain.com.key 2048 | |
#then generate the request | |
openssl req -new -key yourdomain.com.key -out yourdomain.com.csr | |
#http://mikegrouchy.com/blog/setting-up-nginx-with-ssl-and-godaddy.html |
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 withFakeDate = function (fn) { | |
var oldDate = Date; | |
var FakeDate = function () { | |
var self = new oldDate(); | |
self.fakeDateWasHere = true; | |
return self; | |
}; | |
var oldGetFullYear = Date.prototype.getFullYear; | |
Date.prototype.getFullYear = function () { | |
return 1996; |
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
Sub mycro() | |
' | |
' mycro Macro | |
' | |
' Keyboard Shortcut: Ctrl+e | |
' | |
ActiveCell.FormulaR1C1 = "yo dawg" | |
Range("I9").Select | |
Dim ws As Worksheet |