This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
// Minimal example of loading a PEM certificate using pkijs (in node) | |
// babel-polyfill needs to be loaded for pkijs | |
// It uses webcrypto which needs browser shims | |
require('babel-polyfill') | |
const Pkijs = require('pkijs') | |
const Asn1js = require('asn1js') | |
const FS = require('fs') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
go test ./... -v | grep -c RUN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function LCS(s1, s2) { | |
var result = []; | |
for (var i=0; i<=s1.length; i++) { | |
result.push([]); | |
for (var j=0; j<=s2.length; j++) { | |
var currValue = 0; | |
if (i==0 || j==0) { | |
currValue = 0; | |
} else if (s1.charAt(i-1) == s2.charAt(j-1)) { | |
currValue = result[i-1][j-1] + 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/file.c b/file.c | |
index 6faa5a3..e3af329 100644 | |
--- a/file.c | |
+++ b/file.c | |
@@ -1,26 +1,25 @@ | |
#include <stdio.h> | |
-// Frobs foo heartily | |
-int frobnitz(int foo) | |
+int fib(int n) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CSS Color Names | |
// Compiled by @bobspace. | |
// | |
// A javascript object containing all of the color names listed in the CSS Spec. | |
// This used to be a big array, but the hex values are useful too, so now it's an object. | |
// If you need the names as an array use Object.keys, but you already knew that! | |
// | |
// The full list can be found here: https://www.w3schools.com/cssref/css_colors.asp | |
// Use it as you please, 'cuz you can't, like, own a color, man. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var https = require('https'), | |
fs = require('fs'), | |
utillib = require('util'); | |
var options = { | |
key: fs.readFileSync('private_key.pem'), | |
cert: fs.readFileSync('certificate.pem'), | |
ca: [ | |
fs.readFileSync('ESTEID-SK 2007.PEM.cer'), | |
fs.readFileSync('ESTEID-SK.PEM.cer'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright (c) 2011 Andrei Mackenzie | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |