I hereby claim:
- I am mdlawson on github.
- I am mdlawson (https://keybase.io/mdlawson) on keybase.
- I have a public key whose fingerprint is 0DF6 B13E D6E7 CD09 285F 9EB8 8B90 A4DF E816 05A1
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
function doGet(e) { | |
var response = UrlFetchApp.fetch("https://" + SLACK_TEAM_NAME + ".slack.com/api/users.admin.invite", { | |
"method" : "post", | |
"payload": { | |
"token": SLACK_API_TOKEN, | |
"set_active": "true", | |
"email": Session.getActiveUser().getEmail(), | |
} | |
}); | |
var result = JSON.parse(response.getContentText()); |
Everything's a feature | |
Everything is cool we don't have any bugs | |
Everything's a feature when your code is fucked up | |
Everything is working if it builds without an error | |
Side by side, code and I, lets not loop forever, please don't loop forever | |
We're insane, I made you, you hate me, but we're all totally bug free | |
Everything's a feature | |
Everything is cool we don't have any bugs |
%!PS-Adobe-3.0 | |
/Xpos { 300 } def | |
/Ypos { 500 } def | |
/Heading { 0 } def | |
/Arg { 0 } def | |
/Right { | |
Heading exch add Trueheading | |
/Heading exch def | |
} def | |
/Left { |
send: (message,id) -> | |
$http.post(APIURL+"addUserMessage", | |
#userIdFrom: User.id | |
userIdTo: id | |
message: message | |
).success (data) -> | |
console.log "send message",message,"to",toId | |
markRead: (id) -> | |
$http.post(APIURL+"markRead", | |
userIdFrom: id |
var express = require('express'); | |
var facebook = require('connect-facebook-session'); | |
var app = express(); | |
app.configure(function () { | |
app.use(express.bodyParser()); | |
app.use(express.cookieParser()); | |
app.use(express.session({ secret: 'foo bar' })); | |
app.use(facebook({ |
fs = require "fs" | |
os = require "os" | |
{exec} = require "child_process" | |
HOSTS = if os.platform() is "win32" then "C:\\Windows\\System32\\Drivers\\etc\\hosts" else "/etc/hosts" | |
hosts = (name,read,write) -> | |
entry = -1 | |
exit = -1 |
<head> | |
<title>Grassington Town Hall</title> | |
<%= javascript_include_tag "jquery-latest", :media => "all" %> | |
<%= javascript_include_tag "bootstrap", :media => "all" %> | |
<%= stylesheet_link_tag "bootstrap", :media => "all" %> | |
<%= stylesheet_link_tag "application", :media => "all" %> | |
<%= csrf_meta_tags %> | |
</head> | |
<body> | |
<div class="navbar navbar-static-top"> |
Useful stuff
Routing: we need to make routes that take people to games. To do this we can use URL slugs, eg:
/game/200
express allows us to create routes that work like this by using :
in the route. eg
app.get("/game/:id", function(req,res){
res.send("This is game id " + req.params.id);
class Factory | |
constructor: (options) -> | |
@hanger = [] | |
@entity = options.entity or Rogue.Entity | |
@opts = options.options or {} | |
@initial = options.initial | |
for i in [0...@initial] | |
@hanger.push @build() | |
deploy: (num) -> |