Skip to content

Instantly share code, notes, and snippets.

View qualipsolutions's full-sized avatar

Qualip Solutions qualipsolutions

View GitHub Profile

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@qualipsolutions
qualipsolutions / client.js
Created January 3, 2020 07:45 — forked from PaulMougel/client.js
File upload in Node.js to an Express server, using streams
// node: v0.10.21
// request: 2.27.0
var request = require('request');
var fs = require('fs');
var r = request.post("http://server.com:3000/");
// See http://nodejs.org/api/stream.html#stream_new_stream_readable_options
// for more information about the highWaterMark
// Basically, this will make the stream emit smaller chunks of data (ie. more precise upload state)
var upload = fs.createReadStream('f.jpg', { highWaterMark: 500 });
@qualipsolutions
qualipsolutions / iterm2-solarized.md
Created November 13, 2019 13:07 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@qualipsolutions
qualipsolutions / RestartCNTLM.bat
Created February 27, 2018 04:20
Restart CNTLM batch script
@echo OFF
SET serviceName=cntlm
echo ===============================================
echo Stop the %serviceName% Service
echo ===============================================
FOR /F "tokens=3" %%A IN ('sc queryex %serviceName% ^| findstr PID') DO (SET pid=%%A)
IF "!pid!" NEQ "0" (
Taskkill /F /PID %pid%