Skip to content

Instantly share code, notes, and snippets.

@Auronmatrix
Auronmatrix / recursive_check.sh
Last active November 27, 2018 10:35
BashScript to check all subfolders for compromised dependency (https://github.com/dominictarr/event-stream/issues/116)
#!/bin/bash
function recursiveCheck() {
for d in * ; do
if [ $d == "node_modules" ] ; then
#echo "Skipping $PWD"
else if [ -d "$d" ]; then
cd "$d"
#echo "Checking $PWD"
if [ -f "package.json" ];
@Auronmatrix
Auronmatrix / index.sh
Created October 19, 2018 10:37 — forked from max-mapper/index.sh
generate ES512 and RS256 elliptic curve keypairs for JWT JWK (JSON Web Token JSON Web Key) using openssl
# RS256
# private key
openssl genrsa -out rs256-4096-private.rsa 4096
# public key
openssl rsa -in rs256-4096-private.rsa -pubout > rs256-4096-public.pem
# ES512
# private key
openssl ecparam -genkey -name secp521r1 -noout -out ecdsa-p521-private.pem
# public key
#!/bin/bash
for d in */ ; do
cd $d
if [ -d .git ];
then
TAG=$(git describe --abbrev=0 --tags 2>/dev/null)
if [[ $TAG =~ ^v ]];
then
echo "$d : $TAG"
@Auronmatrix
Auronmatrix / authorize.js
Created March 9, 2018 15:35
Google Oauth for Nodejs
// Authorization code extracted from google quickstart guide
// https://developers.google.com/sheets/api/quickstart/nodejs
const fs = require('fs')
const readline = require('readline')
const { OAuth2Client } = require('google-auth-library')
// If modifying these scopes, delete your previously saved credentials
// at ~/.credentials/sheets.googleapis.com-nodejs-quickstart.json
const SCOPES = ['https://www.googleapis.com/auth/spreadsheets']

Keybase proof

I hereby claim:

  • I am auronmatrix on github.
  • I am a21n (https://keybase.io/a21n) on keybase.
  • I have a public key ASCmTzDUMta-F6VonB2oJiTY67L1i4-fdKyU4-VlvJgx0go

To claim this, I am signing this object:

// Add function to set required google event parameters
stopPropagation : function (e){
if(!e){
e=window.event;
}
e.cancelBubble=true;
if(e.stopPropagation){
e.stopPropagation();
}
public async Task<HttpResponseMessage> Post(string name)
{
var response = "Success!";
var httpResponse = new HttpResponseMessage(HttpStatusCode.OK);
httpResponse.Headers.ConnectionClose = true;
string body = Request.Content.ReadAsStringAsync().Result;
// Do your thing with the body content
// Update the response