Skip to content

Instantly share code, notes, and snippets.


Technoknol technoknol

View GitHub Profile
View AppServiceContainer(use statements).php
use GuzzleHttp\Client;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\MessageFormatter;
use GuzzleHttp\Middleware;
use Illuminate\Support\ServiceProvider;
use Monolog\Handler\RotatingFileHandler;
use Monolog\Logger;
technoknol / ERC20Token.sol
Created Jun 15, 2019
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at
View ERC20Token.sol
pragma solidity ^0.4.18;
contract SimpleBank
mapping (address => uint) private balances;
address public owner;
event LogDepositMade(address accountAddress, uint amount);
function SimpleBank() public {
technoknol /
Created May 25, 2019
Shell script to download dummy data just to hog bandwidth. :P
# simple oneliner. This will download 100GB file and send it to /dev/null. So it's just a Bandwidth hogger.
wget -O- > /dev/null
# more fun
# this script will download files indefinitely.
# save below line to a new file, give it name name
# run below command
# sh ./
while :
technoknol / Run-me-in-console.js
Last active May 8, 2019
Send infinite invitations to people in LinkedIn
View Run-me-in-console.js
// Go to my network page
// 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);
View Dockerfile
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
technoknol / index.html
Created Aug 29, 2018
Material Design UI Audio Player
View index.html
<div class="container">
<div class="player">
<div class="like waves-effect waves-light">
<i class="icon-heart"></i>
<div class="mask"></div>
<ul class="player-info info-one">
<li>Rock'n'Roll Nerd</li>
<li>Tim Minchin</li>
technoknol / Load-Import CSV file to MySQL using Query.sql
Created Jan 29, 2018
Load/Import CSV file to MySQL using Query
View Load-Import CSV file to MySQL using Query.sql
INTO TABLE ws_store_products
technoknol / Php Stream - Write to temp stream and force user to download file.php
Created Dec 27, 2017
Php Stream - Write to temp stream and forcefully download file.
View Php Stream - Write to temp stream and force user to download file.php
// Set the limit to 50 MB.
$fiveMBs = 50 * 1024 * 1024;
$fp = fopen("php://temp/maxmemory:$fiveMBs", 'r+');
fputs($fp, $couponString);
// Read what we have written.
header('Content-Description: File Transfer');
technoknol / PhpStorm Shortcuts
Last active Dec 13, 2017
PhpStorm Shortcuts Cheetsheet
View PhpStorm Shortcuts

PhpStorm Shortcuts Cheetsheet

Key Combination Description
Ctrl + J Open live templates
Ctrl + Alt + Shift + J Select text (With multiple cursor)
Alt + Insert Open menu to Generate Documentation, Getter, Setter, etc.
technoknol / Nginx configuration server block (Virtual host) for Laravel Setup.
Last active Dec 12, 2017
Nginx configuration server block (Virtual host) for Laravel Setup.
View Nginx configuration server block (Virtual host) for Laravel Setup.
server {
listen 80 ;
listen [::]:80;
root /var/www/html/blog2/public/;
index index.php index.htm index.nginx-debian.html;
location / {