Skip to content

Instantly share code, notes, and snippets.

View novium's full-sized avatar
­perfect infra

Alexander Troshin novium

­perfect infra
View GitHub Profile
@novium
novium / mock.js
Last active December 5, 2018 19:04
Mock data
let faker = require('faker');
let mysql = require('mysql');
//faker.locale = 'sv';
let connection = mysql.createConnection({
host: 'localhost',
user: 'root',
password: '',
database: 'store'
});/*
@novium
novium / install.ps1
Last active November 28, 2020 10:41
IOOPM Windows Subsystem for Linux
# Self-elevate the script if required
if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) {
if ([int](Get-CimInstance -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber) -ge 6000) {
$CommandLine = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments
Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CommandLine
Exit
}
}
workflow IOOPM-Install {
@novium
novium / install-user-mosh.sh
Last active January 6, 2018 21:47 — forked from ViViDboarder/install-user-mosh.sh
Mosh is great, but sometimes the remote server you're accessing doesn't have it installed or doesn't give you sudo access. This script will install mosh as a user.
#! /bin/bash
# Make a directory to hold local libs and bins
mkdir -p ~/usr/local
# Get protobuf
wget https://github.com/google/protobuf/archive/v2.5.0.tar.gz
# Extract protobuf
mv v2.5.0.tar.gz protobuf-2.5.0.tar.gz
tar -xvzf protobuf-2.5.0.tar.gz
@novium
novium / keybase.md
Last active February 27, 2019 20:00
### Keybase proof
I hereby claim:
* I am Novium on github.
* I am novium (https://keybase.io/novium) on keybase.
* I have a public key whose fingerprint is E589 21F7 500F D663 24A7 BD3B 9A9A E597 A49E 823E
To claim this, I am signing this object: