Skip to content

Instantly share code, notes, and snippets.

@mvoelk
mvoelk / google-redirection-remover.user.js
Created January 19, 2018 19:22
Userscript - Remove redirection from google links
// ==UserScript==
// @name Google Redirect Remover
// @namespace Google Redirect Remover
// @description Stop google links from using their tracking redirect
// @version 1.0.0
// @include https://*.google.com/*
// @include https://*.google.de/*
// ==/UserScript==
@ninjascribble
ninjascribble / node-user-agent.js
Last active September 30, 2024 22:28
Fetching the user-agent string from a request using either NodeJS or NodeJS + Express
/** Native NodeJS */
var http = require('http')
, server = http.createServer(function(req) {
console.log(req.headers['user-agent']);
});
server.listen(3000, 'localhost');
/** NodeJS with Express */
var express = require('express')