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
// to prevent empty objects being pushed in resule like 'eventWinners' : [ {} ] | |
// if there are no winners found, after lookup and unwind. | |
$group: { | |
_id: '$_id', | |
root: { | |
$mergeObjects: '$$ROOT', | |
}, | |
eventWinners: { | |
$push: { |
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
Source : https://web.archive.org/web/20200701114024/https://dev.to/bbavouzet/ubuntu-20-04-mouse-scroll-wheel-speed-536o | |
sudo apt install imwheel | |
chmod +x mousewheel.sh | |
./mousewheel.sh |
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
C:\path\to\putty\PLINK.EXE 167.XXX.XXX.XXX -l root -i C:\path\to\private\key\private.ppk (cd /commands\to\run\separated\by\semicolon;git pull) |
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
<?php | |
use GuzzleHttp\Client; | |
use GuzzleHttp\HandlerStack; | |
use GuzzleHttp\MessageFormatter; | |
use GuzzleHttp\Middleware; | |
use Illuminate\Support\ServiceProvider; | |
use Monolog\Handler\RotatingFileHandler; | |
use Monolog\Logger; |
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
pragma solidity ^0.4.18; | |
contract SimpleBank | |
{ | |
mapping (address => uint) private balances; | |
address public owner; | |
event LogDepositMade(address accountAddress, uint amount); | |
function SimpleBank() public { |
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
# simple oneliner. This will download 100GB file and send it to /dev/null. So it's just a Bandwidth hogger. | |
wget -O- http://speedtest-ny.turnkeyinternet.net/10000mb.bin > /dev/null | |
# more fun | |
# this script will download files indefinitely. | |
# save below line to a new file, give it name bandwidthhogger.sh name | |
# run below command | |
# sh ./bandwidthhogger.sh | |
while : |
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
// Go to my network page | |
// https://www.linkedin.com/mynetwork/ | |
// run below script in Developer tools/Console. | |
// It will send connect request to all suggestions. | |
var t = setInterval(() => { jQuery(document).find('button[data-control-name="invite"]:eq(0)')[0].click(); console.log(jQuery(document).find('button[data-control-name="invite"]:eq(0)').text()) }, 500); |
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
docker run -d redis:3.2.1 | |
docker run -d redis:latest | |
docker run --name redisPort -p 6379:6379 redis:latest | |
docker run --name redisDynamic -p 6379 redis:latest | |
docker run --name redisMapped -v /docker/host/dir:/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
<div class="container"> | |
<div class="player"> | |
<div class="like waves-effect waves-light"> | |
<i class="icon-heart"></i> | |
</div> | |
<div class="mask"></div> | |
<ul class="player-info info-one"> | |
<li>Rock'n'Roll Nerd</li> | |
<li>Tim Minchin</li> | |
<li>5:34</li> |
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
LOAD DATA LOCAL INFILE | |
'products.csv' | |
INTO TABLE ws_store_products | |
FIELDS TERMINATED BY ',' | |
ENCLOSED BY '"' | |
LINES TERMINATED BY '\n' | |
(article_no,store_code,description,qty,mrp,sp); |