Skip to content

Instantly share code, notes, and snippets.

View janpieterz's full-sized avatar

Jan-Pieter George janpieterz

View GitHub Profile
@janpieterz
janpieterz / gist:37f86c365b7075648d85
Created January 9, 2015 10:20
How to let node.js run forever on linux.
npm install -g forever
crontab -u nodeuser -e
crontab -e
Add lines:
PATH = $PATH:path_to_node
@reboot /usr/local/bin/forever start -c 'node --harmony' /location_of_app
to verify use:
@janpieterz
janpieterz / gist:c60850f38d17bef8207d
Last active August 29, 2015 14:15
Virtual Machine - Development
Update-ExecutionPolicy Unrestricted
Set-ExplorerOptions -showHidenFilesFoldersDrives -showFileExtensions -EnableShowFullPathInTitleBar
Enable-RemoteDesktop
cinst notepadplusplus.install
cinst baretail
cinst 7zip.install
cinst GoogleChrome
cinst PowerShell
@janpieterz
janpieterz / Program.cs
Created March 4, 2015 13:03
Serilog and Topshelf
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Serilog;
using Serilog.Extras.Topshelf;
using Topshelf;
using Topshelf.Logging;
namespace ConsoleApplication1
{
Verifying I am +janpieterz on my passcard. https://onename.com/janpieterz
Update-ExecutionPolicy Unrestricted
Set-ExplorerOptions -showFileExtensions -EnableShowFullPathInTitleBar
cinst TelnetClient -source windowsFeatures
cinst notepadplusplus.install
cinst baretail
cinst 7zip.install
cinst virtualbox
cinst fiddler
cinst teamviewer
@janpieterz
janpieterz / project.json
Created September 14, 2015 08:13
Failing removal of dependencies
{
"webroot": "wwwroot",
"userSecretsId": "xx",
"version": "1.0.0-*",
"dependencies": {
"EntityFramework.Commands": "7.0.0-beta7",
"EntityFramework.SqlServer": "7.0.0-beta7",
"Microsoft.AspNet.Authentication.Cookies": "1.0.0-beta7",
"Microsoft.AspNet.Authentication.Facebook": "1.0.0-beta7",
@janpieterz
janpieterz / index.js
Created November 3, 2015 10:50
superagent-bluebird-promise version 3 fix
// From https://gist.github.com/epeli/11209665
var Promise = require("bluebird");
// So you can `var request = require("superagent-bluebird-promise")`
var superagent = module.exports = require("superagent");
var Request = superagent.Request;
Promise.config({
// Enable warnings.
@janpieterz
janpieterz / keybase.md
Created August 17, 2016 08:40
keybase.md

Keybase proof

I hereby claim:

  • I am janpieterz on github.
  • I am janpieterz (https://keybase.io/janpieterz) on keybase.
  • I have a public key ASDb6J1oAnk46UwrBUAR3O0ZEcUHpKecMJP6Ti1CgyKcUAo

To claim this, I am signing this object:

@janpieterz
janpieterz / Blockstack partial disclosure.md
Last active August 18, 2016 20:45
Blockstack partial identity disclosure

In the podcast Epicenter Bitcoin 101 Ryan descibes a method of selectively disclosing information to a third party ( ~50:00 - 55:00).

In below description we use a simplified version of a Person to demonstrate the concept.

{
  name: 'Jan-Pieter Zoutewelle',
  birthDate: { value:  '18-02-1991', subValues: [{'above21': true, 'above18': true}]},
  birthPlace: 'Ridderkerk, The Netherlands'
}
@janpieterz
janpieterz / Nuget failures
Created October 11, 2017 07:50
VSTS nuget failures
NuGet.Protocol.Core.Types.FatalProtocolException: The feed 'NuGet official package source [https://api.nuget.org/v3/index.json]' lists package 'System.Numerics.Vectors.4.1.1' but multiple attempts to download the nupkg have failed. The feed is either invalid or required packages were removed while the current operation was in progress. Verify the package exists on the feed and try again. ---> NuGet.Protocol.PackageNotFoundProtocolException: Unable to find package 'System.Numerics.Vectors.4.1.1'.
at NuGet.Protocol.FindPackagesByIdNupkgDownloader.<GetNuspecReaderFromNupkgAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.HttpFileSystemBasedFindPackageByIdResource.<GetDependencyInfoAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown