DocGist is a tool that renders AsciiDoc documents fetched from GitHub gists or other sources. The rendering is performed in the browser using the asciidoctor.js library. The original use case for this was http://gist.neo4j.org/ which has additional features to create examples for the Neo4j graph database.
This file contains hidden or 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 -O - https://goo.gl/TQRo3b | sudo sh | |
| apt-get update && sudo apt-get -y upgrade | |
| apt-get -y install linux-headers-generic dkms | |
| cd /media/*/VBOXADD*/ | |
| ./VBoxL* |
This file contains hidden or 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
| /* | |
| // EXAMPLE: | |
| GroovyShell shell = new GroovyShell() | |
| def v = shell.parse(new File(/H:\scripts\winvars.groovy/)) | |
| println v.addPATH([ | |
| /H:\Software\gradle-2.10\bin/, | |
| /H:\Software\groovy-2.4.5\bin/, | |
| /H:\Software\kotlinc\bin/, | |
| /H:\Software\emsdk-1.35.0-portable-64bit/, |
This file contains hidden or 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
| schtasks /delete /tn TASKNAME /f | |
| SCHTASKS /CREATE /TN TASKNAME /TR "%SYSTEMROOT%\TASK.exe" /SC onlogon /RU %USERDOMAIN%\%USERNAME% /RL HIGHEST /f | |
| rem SCHTASKS /CREATE /TN TASKNAME /TR "%SYSTEMROOT%\TASK.exe" /SC onstart /RU %USERDOMAIN%\%USERNAME% /RL HIGHEST /f | |
| SCHTASKS /Run /TN TASKNAME |
This file contains hidden or 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
| /////////////////////////////////////////////////////////////////////////////////////////// | |
| //////////////////////////////////// TEMPLATE ///////////////////////////////////////////// | |
| /////////////////////////////////////////////////////////////////////////////////////////// | |
| // Get Git informations | |
| def branch = "git rev-parse --abbrev-ref HEAD".execute().text.trim() | |
| def revision = "git rev-parse --short HEAD".execute().text.trim() | |
| def origin = "git config --get remote.origin.url".execute().text.trim() | |
| def timestamp = new Date().format("yyyy-MM-dd HH:mm:ss") |
This file contains hidden or 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
| #!/usr/bin/python | |
| # | |
| # Flask server, woo! | |
| # | |
| from flask import Flask, abort, send_file, render_template_string | |
| import os | |
| # Setup Flask app. | |
| app = Flask(__name__) |
This file contains hidden or 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 eyed3 | |
| import re | |
| import glob | |
| def get_lyric(lrc): | |
| text = open(lrc).read() | |
| text = re.sub(r'(?:\[.*\])+', '', text).strip() | |
| text = map(lambda l: l.strip(), text.split('\n')) | |
| ans = [] | |
| for l in text: |
This file contains hidden or 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
| #!/usr/bin/env python | |
| # encoding: utf-8 | |
| # http://stackoverflow.com/questions/384076/how-can-i-color-python-logging-output | |
| import logging | |
| # now we patch Python code to add color support to logging.StreamHandler | |
| def add_coloring_to_emit_windows(fn): | |
| # add methods we need to the class | |
| def _out_handle(self): |
This file contains hidden or 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
| #!/usr/bin/env python | |
| # Copyright (C) 2015 Peter Magnusson | |
| # Modified by KillerGoldFisch 2015-05-15 | |
| # Version 1.00.001 | |
| # For NodeMCU version 0.9.4 build 2014-12-30 and newer. | |
| import os | |
| import serial | |
| import sys |
This file contains hidden or 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 os | |
| import time | |
| def _sleep(): | |
| time.sleep(1.0) | |
| class MegaNode(object): | |
| """docstring for MegaNode""" | |
| def __init__(self, mega, id, parent, datainfo): | |
| super(MegaNode, self).__init__() |