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
# pull mssql container | |
docker pull microsoft/mssql-server-linux | |
# run container, change password (strong enough) and port | |
docker run -d --name mssqlOnOSX -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=strongEnoughPassword123' -p 1433:1433 microsoft/mssql-server-linux | |
# see also: | |
# https://medium.com/@reverentgeek/sql-server-running-on-a-mac-3efafda48861 |
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
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All |
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
'use strict'; | |
let colorReset = "\x1b[0m"; //reset | |
let colorCode = (p) => { | |
if (p >= 100){ | |
return "\x1b[31m"; //red | |
} else if (p < 100 && p >= 90){ | |
return "\x1b[36m"; //cyan | |
} | |
return "\x1b[32m"; //green |
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
'use strict'; | |
const FS = require('fs'); | |
const OS = require('os'); | |
let EXEC_PATH = process.argv[1]; | |
let FILE_PATH = getFilePath(EXEC_PATH); | |
const FILE = JSON.parse(FS.readFileSync(FILE_PATH + '/myFile.json', 'utf8')); | |
function getFilePath(execPath){ | |
let splitter = (OS.type() === "Windows_NT") ? "\\" : "/"; |
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
[alias] | |
adog = log --all --decorate --oneline --graph | |
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all | |
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all | |
lg = !"git lg1" | |
st = status --short | |
b = branch -vv | |
[core] | |
editor = code --wait | |
autocrlf = input |
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
defaults write com.apple.desktopservices DSDontWriteNetworkStores true |
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 serialport = require("serialport"); | |
var SerialPort = serialport.SerialPort; | |
var port = "/dev/tty.usbmodem1411"; | |
var sp = new SerialPort(port, { | |
parser: serialport.parsers.readline("\n") | |
}); | |
sp.on("data", function (data) { | |
console.log(data); |
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
xcode-select --install |
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 gulp = require('gulp'), | |
gutil = require('gulp-util'), | |
sass = require('gulp-sass'), | |
concat = require('gulp-concat'), | |
connect = require('gulp-connect'); | |
gulp.task('sass', function () { | |
gulp.src('./scss/*.scss') | |
.pipe(sass({errLogToConsole: true})) | |
.pipe(gulp.dest('./css/tmp/')) |
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
// init vector | |
vector <int> myVec(10); | |
//size of vector | |
int vSize = myVec.size(); | |
// access to element n | |
myVec[0] = 1; // no buffer checking | |
myVec.at(1) = 2; | |
// resize vector | |
myVec.push_back(11); // extends vector by 1 and give it value of parameter | |
myVec.resize(myVec.size()+1); // extends vector by 1 and initializes last element with 0 |