Skip to content

Instantly share code, notes, and snippets.

View Mikej81's full-sized avatar
💭
I may be slow to respond.

Michael Mikej81

💭
I may be slow to respond.
View GitHub Profile
@EddieCanales
EddieCanales / rdp.js
Last active April 30, 2019 05:11
How to get screenshots when using node-rdpjs. Write the partial bitmap and render it into the right section of the "buffer" image, then save that to disk whenever you need to.
const screen = require('./screen');
const SCREEN_SIZE = { width : 1364, height : 768 };
async function saveScreen(label) {
await screen.write('screen-'+Date.now()+'-'+(label || '')+'.png');
}
async function createRemoteSession(userName, password, server, rdpScreenSaveInterval=0) {
const clientConfig = {
autoLogin: true,
@goodjob1114
goodjob1114 / howToModifyOvaFile.md
Last active January 27, 2024 10:49
how to modify .ova file on linux/Mac using terminal....export vm (OVF 1.0) from virtualbox, then modify some tag and hash value for import vm to ESXi

extract ova files from an archive

$ tar -xvf vmName.ova

modify ovf for some invalid tag

$ vi vmName.ovf
@amitchhajer
amitchhajer / Count Code lines
Created January 5, 2013 11:08
Count number of code lines in git repository per user
git ls-files -z | xargs -0n1 git blame -w | perl -n -e '/^.*\((.*?)\s*[\d]{4}/; print $1,"\n"' | sort -f | uniq -c | sort -n
@incredimike
incredimike / variousCountryListFormats.js
Last active August 21, 2024 03:44
List of Countries in various Javascript data structures: Alphabetical country lists & Country data objects.
// Lists of countries with ISO 3166 codes, presented in various formats.
// Last Updated: July 30, 2020
// If you're using PHP, I suggest checking out:
// https://github.com/thephpleague/iso3166
// or Laravel: https://github.com/squirephp/squire
//
// JS developers can check out:
// https://www.npmjs.com/package/iso3166-2-db
//