Skip to content

Instantly share code, notes, and snippets.

@mmeyers00
mmeyers00 / private_fork.md
Created July 12, 2022 20:19 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

let _ = require('lodash'),
let a = [{
"City": "Berlin",
"ContactName": "Test One",
"ContactTitle": "Sales Representative",
"Country": "Germany",
"Id": "ALFKI",
"Region": "Western Europe"
}],
@mmeyers00
mmeyers00 / exec.js
Last active January 23, 2019 16:27
Execute command from terminal syncronously, convert result to JSON
const { execSync } = require('child_process');
let result = execSync("sqlite3 -header -csv test.db 'select * from testing' | csv2json -d"),
obj = JSON.parse(result.toString().trim());
console.log(obj);
@mmeyers00
mmeyers00 / load.js
Created January 18, 2019 21:11
Load external Javascript with a Promise
function loadjs(file) {
return new Promise(resolve => {
var script = document.createElement("script");
script.type = "application/javascript";
script.src = file;
document.body.appendChild(script);
resolve(true);
});
}