We have moved: https://github.com/magnetikonline/linuxmicrosoftievirtualmachines
Due to the popularity of this Gist, and the work in keeping it updated via a Gist, all future updates will take place at the above location. Thanks!
| var Q = require("q"); | |
| exports.read = function (path, timeout) { | |
| var response = Q.defer(); | |
| var request = new XMLHttpRequest(); // ActiveX blah blah | |
| request.open("GET", path, true); | |
| request.onreadystatechange = function () { | |
| if (request.readyState === 4) { | |
| if (request.status === 200) { |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
| /* | |
| * node-ws - pure Javascript WebSockets server | |
| * Copyright Bradley Wright <brad@intranation.com> | |
| */ | |
| // Use strict compilation rules - we're not animals | |
| 'use strict'; | |
| var net = require('net'), | |
| crypto = require('crypto'); |
| /** | |
| * Module dependencies | |
| */ | |
| var express = require('express'); | |
| var fs = require('fs'); | |
| var mongoose = require('mongoose'); | |
| var Schema = mongoose.Schema; | |
| // img path |
| def cte_attr(*attrs) | |
| attrs.each do |name| | |
| class_eval <<-ATTR | |
| def #{name}=(value) | |
| @#{name} = value | |
| super | |
| end | |
| ATTR | |
| end | |
| end |
| import static javax.ws.rs.core.MediaType.APPLICATION_JSON; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.InputStreamReader; | |
| import java.io.OutputStream; | |
| import java.io.PrintWriter; | |
| import java.lang.annotation.Annotation; | |
| import java.lang.reflect.Type; |
We have moved: https://github.com/magnetikonline/linuxmicrosoftievirtualmachines
Due to the popularity of this Gist, and the work in keeping it updated via a Gist, all future updates will take place at the above location. Thanks!
| // create file: | |
| sudo vim /usr/share/applications/intellij.desktop | |
| // add the following | |
| [Desktop Entry] | |
| Version=13.0 | |
| Type=Application | |
| Terminal=false | |
| Icon[en_US]=/home/rob/.intellij-13/bin/idea.png | |
| Name[en_US]=IntelliJ |
| /** @jsx React.DOM */ | |
| var ReactDropzone = React.createClass({ | |
| componentDidMount: function() { | |
| var options = {}; | |
| for (var opt in Dropzone.prototype.defaultOptions) { | |
| var prop = this.props[opt]; | |
| if (prop) { | |
| options[opt] = prop; | |
| continue; |
| app = angular.module 'BlogExample', [] | |
| # Simple controller that loads all blog posts | |
| app.controller 'BlogCtrl', ['$scope', 'Blog', ($scope, Blog) -> | |
| # Get all the blog posts | |
| Blog.all().then (posts) -> | |
| $scope.posts = posts | |
| # Extend the $scope with our own properties, all in one big block | |
| # I like this because it looks like declaring a class. |