Begin by making sure both parties are on latest version of surge
npm install -g surge
- Add user as collaborator by inviting them on your next deployment.
// test by running `node test.js` | |
var spawn = require("child_process").spawn | |
var child = spawn("sudo", [__dirname + "/bin/server"]) | |
child.stderr.on('data', function (data) { | |
child.stdin.write("somepassword" + '\n'); | |
}) |
var http = require("http"), | |
util = require("util") | |
http.createServer(function(req, rsp){ | |
var regex = /^\/(v1|v2)/g | |
var matches = req.url.match(regex) | |
if((matches && matches[0] === "/v1") || (req.headers["x-api-version"] === "v1")) | |
var port = 8001 |
List of regions your project is served from when you deploy using surge. | |
yyz.surge.sh : 159.203.50.177 : CA : Toronto | |
jfk.surge.sh : 159.203.159.100 : US : New York | |
sfo.surge.sh : 138.197.235.123 : US : San Francisco | |
lhr.surge.sh : 46.101.67.123 : GB : London | |
ams.surge.sh : 188.166.132.94 : NL : Amsterdam | |
fra.surge.sh : 138.68.112.220 : DE : Frankfurt | |
sgp.surge.sh : 139.59.195.30 : SG : Singapore |
System information commands | |
=========================== | |
(*) #su Show only errors and warnings: `dmesg --level=err,warn` | |
(*) View dmesg output in human readable format: `dmesg -T` | |
(*) Get an audio notification if a new device is attached to your computer: `dmesg -tW -l notice | gawk '{ if ($4 == "Attached") { system("echo New device attached | espeak") } }` | |
(*) Dmesg: follow/wait for new kernel messages: `dmesg -w` | |
(*) The proper way to read kernel messages in realtime.: `dmesg -wx` | |
(*) Query graphics card: `lspci -nnk | grep -i VGA -A2` |
var q= function(s){ return document.getElementById(s) } | |
function send(){ | |
var input = q('text'); | |
socket.send(input.value); | |
input.value = ''; | |
} | |
var socket = new io.Socket(null, { | |
port: 8001, |
exports.encode = function(txt){ | |
return JSON.stringify({a: "hello world"}).replace(/^\{\"a\"\:\"/, "").replace(/\"\}$/, "") | |
} | |
exports.decode = function(line){ | |
return JSON.parse('{"a": "' + line + '"}')["a"] | |
} |
this.addEventListener('install', function(event) { | |
event.waitUntil( | |
caches.open('v1.1').then(function(cache) { | |
return cache.addAll([ | |
'/style.css', | |
'/app.js', | |
'../views/404.html', | |
'../views/offline.html' | |
]); | |
}) |
...by adding an EVENT.json
file to the root of your project.
Hosting an event on surge is very simple. It's three easy steps.
surge ./myproject superevent.io
)superevent.io
and *.superevent.io
DNS records to surges servers.EVENT.json
file with the following properties...I value diversity and inclusion, am not denying that sexism exists, and don’t endorse using stereotypes. When addressing the gap in representation in the population, we need to look at population level differences in distributions. If we can’t have an honest discussion about this, then we can never truly solve the problem. Psychological safety is built on mutual respect and acceptance, but unfortunately our culture of shaming and misrepresentation is disrespectful and unaccepting of anyone outside its echo chamber. Despite what the public response seems to have been, I’ve gotten many personal messages from fellow Googlers expressing their gratitude for bringing up these very important issues which they agree with but would never have the courage to say or defend because of our shaming culture and the possibility of being fired. This needs to change.