start new:
tmux
start new with session name:
tmux new -s myname
//PhantomJS http://phantomjs.org/ based web crawler Anton Ivanov [email protected] 2012 | |
//UPDATE: This gist has been made into a Node.js module and now can be installed with "npm install js-crawler" | |
//the Node.js version does not use Phantom.JS, but the API available to the client is similar to the present gist | |
(function(host) { | |
function Crawler() { | |
this.visitedURLs = {}; | |
}; | |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// Promise.all is good for executing many promises at once | |
Promise.all([ | |
promise1, | |
promise2 | |
]); | |
// Promise.resolve is good for wrapping synchronous code | |
Promise.resolve().then(function () { | |
if (somethingIsNotRight()) { | |
throw new Error("I will be rejected asynchronously!"); |
Configuration | |
============= | |
Node 1 : | |
[mysqld] | |
basedir=/home/nirbhay/project/git-repo/maria/10.1/install | |
datadir=/home/nirbhay/project/git-repo/maria/10.1/install/data1 | |
log-bin | |
log-slave-updates | |
binlog_format=row |
batchFindAll = (model,where,cback,size=10)-> | |
model.count({where}) | |
.then (res)=> | |
total = res | |
[0..Math.floor(total/size)].reduce (curr,num)=> | |
count = num*10 | |
curr.then => cback(where,count,size) | |
,Promise.resolve() |
<?php | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
use Aws\S3\S3Client; | |
use League\Flysystem\AwsS3v3\AwsS3Adapter; | |
use League\Flysystem\Filesystem; | |
use Storage; |
#!/bin/bash | |
rm -rf /home/yen3/ubuntu.qcow2 | |
qemu-img create -f qcow2 /home/yen3/ubuntu.qcow2 10G | |
virsh undefine ubuntu1604arm64 --nvram | |
install_from_localtion() { | |
virt-install -n ubuntu1604arm64 --memory 1024 --arch aarch64 --vcpus 1 \ | |
--disk /home/yen3/ubuntu.qcow2,device=disk,bus=virtio \ |
ipvtap is similar to macvtap, but works over wifi too, since it uses the same mac address as the wifi interface.
libvirt doesn't support ipvtap, so we have to configure everything manually. Important data we need before we start:
wlan0
in my case (it's already connected - use NM or networkd+iwd).On the host:
Start by checking that there aren't any previous ssh keys inside the FIDO2 authenticator of your YubiKey. You can check if they exist by running the command below:
nix shell nixpkgs#yubikey-manager -c ykman fido credentials list
If the command above outputs a string mentioning "ssh" or "openssh", then you have already got a key generated and store on your YubiKey.
Before generating a new ssh key to store on your YubiKey you must consider which additional required authentication factors you want to use. Below you can see a table with the available factors and their corresponding command: