Skip to content

Instantly share code, notes, and snippets.

Jon Davis stimpy77

View GitHub Profile
stimpy77 / Javascript Injector script.js
Created Jun 29, 2020
Remove unwanted link in Facebook sidebar
View Javascript Injector script.js
function clearLeftistPropaganda() {
// remove Lift Black Voices tag on left sidebar
var aTags = document.getElementsByTagName("a");
for(var t in aTags) {
var tag = aTags[t];
if (tag.getAttribute && tag.getAttribute("data-testid") === "left_nav_item_Lift Black Voices") {
stimpy77 / AspNetMvcRazorEmail.cs
Created Dec 1, 2015
Send e-mail from ASP.NET MVC Razor View
View AspNetMvcRazorEmail.cs
public class EmailController : Controller
// GET: Default
public ActionResult Index()
return RedirectToAction(nameof(SendEmail), new
To = "Jon Davis <>",
From ="Phil Whiffenfarts <>",
stimpy77 /
Last active Aug 29, 2015
How to richly enable a PowerShell script in a C# project to run in MSBuild

#How to richly enable a PowerShell script in a C# project to run in MSBuild

  1. Open the .csproj file in Notepad++ (or, right-click the project, choose "Unload Project", then right-click it again and choose "Edit")

  2. Paste the following before the </Project> tag at the end:

     <UsingTask TaskName="InvokePowerShell" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v$(MSBuildToolsVersion).dll">
           <ScriptFile ParameterType="System.String" Required="true" />
stimpy77 / repl.js
Created Aug 27, 2014
REPL for nodeJS as function of app
View repl.js
var readline = require('readline');
var trustedEval = eval;
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout
rl.on('line', function (cmd) {
if (((cmd || '').replace(/\s*/g, '')) === '') {
You can’t perform that action at this time.