Reference(s):
http://www.sourcegear.com/diffmerge/downloads.php - get the installer version, NOT the dmg version
var net = require("net"); | |
process.stdin.setEncoding('utf-8'); | |
var connection = net.connect(10000, "192.168.137.1", function() { // connect to the server we made | |
console.log("client connected"); | |
// When receive user input data in console. | |
process.stdin.on('data', function (message) { | |
// If user do not input data in command line then send default message. |
// Require node js dgram module. | |
var dgram = require('dgram'); | |
// Create a udp socket client object. | |
var client = dgram.createSocket("udp4"); | |
// message variable is used to save user input text. | |
var message = ""; | |
// Set command line input character encoding to utf-8. |
// When everything starts bothering you, yeter is yeter. | |
// to contribute | |
// https://gist.github.com/ramesaliyev/13a710f602cfb922d05bef940be3ac31 | |
// to use | |
// https://kes.im/yeterjs | |
// in html: | |
// <script src="https://kes.im/yeterjs"></script> |
const rmel = selector => { | |
try { | |
for (el of document.querySelectorAll(selector)) { | |
el.parentElement.removeChild(el); | |
} | |
} catch (e) { | |
} | |
} | |
const gel = selector => ( |
Reference(s):
http://www.sourcegear.com/diffmerge/downloads.php - get the installer version, NOT the dmg version
# Simply Add this into your .bashrc or .zshrc or something. | |
# Reload bash and then; | |
# kilp 7070 | |
function kilp() { | |
kill -9 $(lsof -ti tcp:$1) | |
} |
# This will; | |
# - stop every container | |
# - remove every container | |
# - remove every image | |
# - remove every network | |
# - remove every volume | |
$(docker stop -f $(docker ps -aq)) / | |
$(docker rm -f $(docker ps -aq)) / | |
$(docker rmi -f $(docker images -aq)) / |
for file in ADA202_*.pdf | |
do | |
mv "$file" "${file/ADA202_/}" | |
done |
// Invoked once before first render | |
componentWillMount() { | |
console.log('componentWillMount'); | |
// Calling setState here does not cause a re-render | |
} | |
// Invoked once after the first render | |
componentDidMount(){ | |
console.log('componentDidMount'); | |
} |
# Create your superuser | |
$ mongo | |
> use admin | |
> db.createUser({user:"someadmin",pwd:"secret", roles:[{role:"root",db:"admin"}]}) | |
> exit | |
# Alias for convenience (optional and at your own risk) | |
$ echo 'alias mongo="mongo --port 27017 -u someadmin -p secret --authenticationDatabase admin"' >> ~/.bash_profile | |
$ source ~/.bash_profile |