Skip to content

Instantly share code, notes, and snippets.

View euoia's full-sized avatar

James Pickard euoia

  • https://www.greendragonbungay.co.uk
  • Bungay, Suffolk, England
View GitHub Profile
<VirtualHost *>
ServerName www.multiplayergorillas.com
ServerAlias multiplayergorillas.com
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /socket.io/1/websocket ws://localhost:3000/socket.io/1/websocket
@euoia
euoia / socket.io-server
Last active August 29, 2015 13:56
Simple socket.io server example
var Socketio = require('socket.io'),
http = require('http');
var port = 3000;
// Create the HTTP server.
var server = http.createServer().listen(port, function() {
console.log("HTTP server listening on port %d.", port);
});
@euoia
euoia / gist:9399242
Created March 6, 2014 20:42
Make long pieces of text wrap
a, p {
white-space: pre; /* CSS 2.0 */
white-space: pre-wrap; /* CSS 2.1 */
white-space: pre-line; /* CSS 3.0 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
white-space: -moz-pre-wrap; /* Mozilla */
white-space: -hp-pre-wrap; /* HP Printers */
word-wrap: break-word; /* IE 5+ */
}
@euoia
euoia / gist:9402335
Created March 6, 2014 23:58
npm install grunt-contrib-uglify --save-dev error
greendragonbungay.co.uk|master⚡ ⇒ npm install grunt-contrib-uglify --save-dev
npm WARN package.json greendragonbungay.co.uk@0.0.0 No README.md file found!
npm http GET https://registry.npmjs.org/grunt-contrib-uglify
npm http 304 https://registry.npmjs.org/grunt-contrib-uglify
npm http GET https://registry.npmjs.org/maxmin
npm http GET https://registry.npmjs.org/uglify-js
npm http GET https://registry.npmjs.org/chalk
npm http 304 https://registry.npmjs.org/maxmin
npm http 304 https://registry.npmjs.org/uglify-js
npm ERR! Error: No compatible version found: maxmin@'^0.1.0'
[root@00-0c-29-fb-5a-03 ~]# cat /zones/zone.json
{
"brand": "joyent",
"dataset_uuid": "81223438-7874-11e3-9edf-8f1e15269924",
"nics": [{
"nic_tag": "admin",
"ip": "192.168.1.197",
"netmask": "255.255.255.0",
"gateway": "192.168.1.1"
}]
@euoia
euoia / gist:385c899996a26ee330f4
Created July 30, 2014 22:32
swagger-ui git diff after running npm run-script build on master (c948b4)
diff --git a/dist/index.html b/dist/index.html
index 5af095a..caf4ef0 100644
--- a/dist/index.html
+++ b/dist/index.html
@@ -47,7 +47,8 @@
onFailure: function(data) {
log("Unable to Load SwaggerUI");
},
- docExpansion: "none"
+ docExpansion: "none",
Users.js
var Users = (function() {
Users.prototype.users = false;
function Users() {
}
Users.prototype.create = function(userData) {
};
var Users = function() {
console.log('Users Initiated');
}
Users.prototype.find = function(username) {
console.log(username);
};
module.exports = Users;
@euoia
euoia / gist:52f0426b2dfa32447b66
Created April 1, 2015 10:58
fatal error: all goroutines are asleep - deadlock!
package main
import (
"bufio"
"fmt"
"io"
)
func main() {
r, w := io.Pipe()
for (;;);{"error":null,"payload":{"dialog":"\u003cform method=\"POST\" class=\"aphront-dialog-view aphront-exception-dialog aphront-dialog-view-standalone\" data-sigil=\"jx-dialog\"\u003e\u003cinput type=\"hidden\" name=\"__csrf__\" value=\"B@etmnwjvq6c2763befeef4872\" \/\u003e\u003cinput type=\"hidden\" name=\"__form__\" value=\"1\" \/\u003e\u003cinput type=\"hidden\" name=\"__dialog__\" value=\"1\" \/\u003e\u003cdiv class=\"aphront-dialog-head\"\u003e\u003cdiv class=\"phui-header-shell \"\u003e\u003ch1 class=\"phui-header-view\"\u003e\u003cdiv class=\"phui-header-row\"\u003e\u003cdiv class=\"phui-header-col2\"\u003e\u003cspan class=\"phui-header-header\"\u003eUnhandled Exception (&quot;AphrontSchemaQueryException&quot;)\u003c\/span\u003e\u003c\/div\u003e\u003cdiv class=\"phui-header-col3\"\u003e\u003c\/div\u003e\u003c\/div\u003e\u003c\/h1\u003e\u003c\/div\u003e\u003c\/div\u003e\u003cdiv class=\"aphront-dialog-body phabricator-remarkup grouped\"\u003e\u003cdiv class=\"aphront-unhandled-exception\"\u003e\u003