I hereby claim:
- I am hadifarnoud on github.
- I am hadifarnoud (https://keybase.io/hadifarnoud) on keybase.
- I have a public key ASBt8cqYQ9U7QGc1kxCkfBnL3qBo8th7pHKGkU4Yp18jAwo
To claim this, I am signing this object:
| #!/bin/bash | |
| # URL to check for internet connectivity | |
| URL="https://cp.cloudflare.com/generate_204" | |
| INTERVAL=60 # Interval in seconds between checks | |
| RETRIES=3 # Number of retries before concluding that the internet is down | |
| RETRY_DELAY=1 # Delay in seconds between retries | |
| CURL_TIMEOUT=1 # Curl timeout in seconds | |
| # Function to check connectivity and measure latency |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| bash script2.sh& |
| var request = require("request"); | |
| var jar = request.jar(); | |
| var options = { | |
| method: 'GET', | |
| url: 'https://api.sendinblue.com/v3/reseller/children', | |
| headers: { | |
| 'api-key': 'xkeysib-nM8cGXSB6sEjWRa0' | |
| } |
This is a step-by-step tutorial for hosting your website under your domain on IPFS, from zero, on a DigitalOcean Ubuntu 16.04.3 x64 Droplet (i am using the $10 variant with 2GB RAM).
Log in as root.
First, make sure the system is up to date, and install tar and wget:
| # download linux kenel | |
| wget http://kernel.ubuntu.com/~kernel-ppa/mainline/<version>/linux-headers-<version>_all.deb | |
| wgte http://kernel.ubuntu.com/~kernel-ppa/mainline/<version>/linux-headers-<version>-generic_<version>_arm64.deb | |
| wget http://kernel.ubuntu.com/~kernel-ppa/mainline/<version>/linux-image-<version>-generic_<version>_amd64.deb | |
| # intsall linux kenel | |
| sudo dpkg -i *.deb | |
| # unintsall old kenel | |
| dpkg -l|grep linux-image |
| # Combine multiple images into one. | |
| # | |
| # To install the Pillow module on Mac OS X: | |
| # | |
| # $ xcode-select --install | |
| # $ brew install libtiff libjpeg webp little-cms2 | |
| # $ pip install Pillow | |
| # | |
| from __future__ import print_function |
| // Use the router(s) for any internal (relative) links, unless it has a | |
| // `data-bypass` attribute or is `target=_blank` | |
| $(document).on('click', 'a:not([data-bypass],[target])', function(evt) { | |
| var href = $(this).attr('href'), | |
| protocol = this.protocol + '//'; | |
| // For <a href="#"> links, we always want to preventDefault to avoid having to do | |
| // this within each individual Backbone View event function. | |
| // (However don't preventDefault on #something URLs in case we need to jump down a page.) |
| { | |
| "email": "[email protected]", | |
| "zone": "CLOUDFLARE_ZONE", | |
| "token": "CLOUDFLARE_TOKEN" | |
| } |
| //gulp & plugins | |
| var gulp = require('gulp'); | |
| var gutil = require('gulp-util'); | |
| var jshint = require('gulp-jshint'); | |
| var browserify = require('gulp-browserify'); | |
| var jade = require('gulp-jade'); | |
| var stylus = require('gulp-stylus'); | |
| var mocha = require('gulp-mocha'); | |
| var nodemon = require('gulp-nodemon'); | |
| var livereload = require('gulp-livereload'); |