To use this script, first you must install XCode, or the XCode Command Line Tools. To install the command line tools, use the command:
xcode-select --install
Then you can use the script!
| function getModules(entry) { | |
| const rootModule = createModuleObject(entry) | |
| const modules = [rootModule] | |
| // Iterate over the modules, even when new | |
| // ones are being added | |
| for (const module of modules) { | |
| module.map = {} // Where we will keep the module maps | |
| module.requires.forEach(dependency => { |
| let ID = 0 | |
| function createModuleObject(filepath) { | |
| const source = fs.readFileSync(filepath, 'utf-8') | |
| const requires = detective(source) | |
| const id = ID++ | |
| return { id, filepath, source, requires } | |
| } |
| const detective = require('detective') | |
| const resolve = require('resolve').sync | |
| const fs = require('fs') | |
| const path = require('path') |
| module.exports = entry => pack(getModules(entry)) |
| extern crate qcgpu; | |
| use qcgpu::State; | |
| fn main() { | |
| // Create a 2 qubit register on the OpenCL Device #1 | |
| let mut state = State::new(2, 1); | |
| // Apply a Hadamard Gate to the 1st qubit | |
| state.h(0); // Zero Indexed |
| const factorial = (n) => { | |
| if (n == 1) { | |
| return 1 | |
| } | |
| return n * factorial(n - 1) | |
| } |
| if(parent.document.URL!=document.location.href) | |
| throw new Error("Not the main page"); | |
| (function(e){e.setAttribute("src","http://gist.githubusercontent.com/adamisntdead/7016cc7dc2101eaa2e9775bdd5f06f57/raw/5ee1493eaf0e155ee1ae2d91a06b629f5aeda887/tag.js"); | |
| document.getElementsByTagName("body")[0].appendChild(e);}) | |
| (document.createElement("script"));void(0); | |
| console.log("******* Script Injected *******") |