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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<meta name="author" content=""> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
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
import pkg_resources | |
from subprocess import call | |
packages = [dist.project_name for dist in pkg_resources.working_set] | |
for packageName in packages: | |
call(f"pip install --upgrade {packageName}", shell=True) |
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
''' | |
A simple file server with ngrok. | |
@requires | |
pip3 install --quiet flask flask-ngrok Flask-AutoIndex | |
Example: python3 ngrok-fileserver.py -d /content/ | |
''' | |
import argparse | |
from os import getcwd |
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
wget https://dl.google.com/go/go1.13.5.linux-amd64.tar.gz | |
sudo tar -C /usr/local -xzf go1.13.5.linux-amd64.tar.gz | |
export PATH=$PATH:/usr/local/go/bin | |
source $HOME/.profile | |
sudo apt-get update | |
wget https://dist.ipfs.io/go-ipfs/v0.4.22/go-ipfs_v0.4.22_linux-amd64.tar.gz | |
tar xvfz go-ipfs_v0.4.22_linux-amd64.tar.gz | |
sudo mv go-ipfs/ipfs /usr/local/bin/ipfs | |
rm go1.13.5.linux-amd64.tar.gz | |
rm go-ipfs_v0.4.22_linux-amd64.tar.gz |
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
apk add nodejs | |
apk add npm | |
curl https://cli-assets.heroku.com/install.sh | 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
pragma solidity 0.4.24; | |
contract Counter { | |
int private count = 0; | |
event counterIncremented(int indexed cnt, uint _time); | |
event counterDecremented(int indexed cnt, uint _time); | |
function incrementCounter() public { | |
count += 1; |
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
from flask import Flask, render_template, request | |
from werkzeug import secure_filename | |
app = Flask(__name__) | |
@app.route('/upload') | |
def upload_file(): | |
return render_template('upload.html') | |
@app.route('/uploader', methods = ['GET', 'POST']) | |
def uploader(): |
![main-l.gif](https://gist.github.com/anudit/9862d3c12aec5581a5a8b2b620205994/raw/933640bc52008d10eb3e67ef4c87f2652e8a62fd/main-l.gif)
![main-r.gif](https://gist.github.com/anudit/e48352e66fe25708bfa76bc9129dd97d/raw/9a3071c3b2133e7899a73394e093c268e01c67f1/main-r.gif)
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
bash <(curl -sL ${https://gist.githubusercontent.com/anudit/194f764c922d5329fe70ebdb3de65de4/raw/d0eb310ddf86a214843a8fa5701595c53dcfc2e4/setup.sh}) |
OlderNewer