pastebin

Is there an internal alternative to gist.github.com to run behind a firewall?

旧时模样 提交于 2019-12-02 15:50:19
gist.github.com is incredibly handy, but I'd like to be able run something similar for sharing code samples internally with other developers behind the firewall where I work, so I don't constantly need to be sanitising my code all the time, just to talk about code examples. Does anything like this exist? I'm not after big project management tools, just a way to make throwaway gists, and share links easily, that also happen to be git repos, just like gist.github.com weakish You may check pastgit: git backed paste server (gist python clone) https://github.com/mmikulicic/pastgit Also gitpaste:

How to paste text in Pastebin using JavaScript

China☆狼群 提交于 2019-11-30 20:49:28
I'm using Tampermonkey (the same as Greasemonkey, but for Chrome) to make a script. The idea is to paste the text I write into Pastebin. The text was written in other website. I saw I can do it using GM_xmlhttpRequest, but it doesn't work. This is my code: var charac = new Array(50); var i =0 function callkeydownhandler(evnt) { var ev = (evnt) ? evnt : event; var code=(ev.which) ? ev.which : event.keyCode; charac[i]= code; i++; } if (window.document.addEventListener) { window.document.addEventListener("keydown", callkeydownhandler, false); } else { window.document.attachEvent("onkeydown",

How to paste text in Pastebin using JavaScript

北城余情 提交于 2019-11-30 05:27:53
问题 I'm using Tampermonkey (the same as Greasemonkey, but for Chrome) to make a script. The idea is to paste the text I write into Pastebin. The text was written in other website. I saw I can do it using GM_xmlhttpRequest, but it doesn't work. This is my code: var charac = new Array(50); var i =0 function callkeydownhandler(evnt) { var ev = (evnt) ? evnt : event; var code=(ev.which) ? ev.which : event.keyCode; charac[i]= code; i++; } if (window.document.addEventListener) { window.document

PowerShell keep text formatting when reading in a file

≯℡__Kan透↙ 提交于 2019-11-28 03:09:45
问题 I believe this is a simple question, but I can't wrap my head around it. I want to do diagnostic commands in command shell on Windows. Like this: $cmd = "ipconfig >> c:\test.txt" $message = Invoke-Expression($cmd) [String]$message = Get-Content c:\topsecret\testme.txt Then I want to be able to read the file and keep the formatting and lastly publish it to pastebin via their API. I've tried, but I seem to lose the formatting no matter what I do. Is this possible to do? 回答1: This happens