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 julia | |
| function use_or_import(pkg) | |
| quote | |
| try | |
| using $(pkg) | |
| catch | |
| import Pkg | |
| Pkg.add($("$(pkg)")) | |
| using $(pkg) |
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
| # This file is machine-generated - editing it directly is not advised | |
| [[ArgTools]] | |
| git-tree-sha1 = "3ca019a0a4a469dbade0869856794ad783ef3574" | |
| uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" | |
| version = "1.0.1" | |
| [[Base64]] | |
| uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| empty!(Base.DEPOT_PATH) | |
| push!(Base.DEPOT_PATH, joinpath(@__DIR__, "depot")) | |
| using Pkg | |
| Pkg.update() | |
| registry_dir = joinpath(@__DIR__, "depot", "registries", "General") | |
| regdict = Pkg.Types.read_registry(joinpath(registry_dir, "Registry.toml"))["packages"] | |
| ctx = Pkg.Types.Context() | |
| all_pkgspecs = Pkg.Types.PackageSpec[] |
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
| 2020-04-02T18:53:08Z I! Starting Telegraf 1.10.4 | |
| 2020-04-02T18:53:08Z I! Using config file: /etc/telegraf/telegraf.conf | |
| 2020-04-02T18:53:08Z I! Loaded inputs: cpu disk mem docker temp diskio kernel processes swap system net sensors | |
| 2020-04-02T18:53:08Z I! Loaded aggregators: | |
| 2020-04-02T18:53:08Z I! Loaded processors: | |
| 2020-04-02T18:53:08Z I! Loaded outputs: influxdb | |
| 2020-04-02T18:53:08Z I! Tags enabled: host=firefly1 project=julia | |
| 2020-04-02T18:53:08Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"firefly1", Flush Interval:1m0s | |
| 2020-04-02T18:53:10Z E! [inputs.sensors]: Error in plugin: failed to run command /usr/bin/sensors -A -u: exit status 1 - No sensors found! | |
| Make sure you loaded all the kernel drivers you need. |
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
| using Pkg, Pkg.Artifacts, Printf | |
| function readdir_empty(path::String) | |
| if !isdir(path) | |
| return String[] | |
| end | |
| return readdir(path) | |
| end | |
| function list_artifacts(depots::Vector = Pkg.depots()) |
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 pefile, shutil, os, struct | |
| from optparse import OptionParser | |
| # Example usage: rewrite_imports.py --rewrite libfoo.dll:lib/libfoo.dll --rewrite libbar.dll:../share/artifacts/1a2b3c/bin/libbar-1.dll usr/bin/julia.exe | |
| parser = OptionParser(usage="usage: %prog [--rewrite FROM:TO]... file") | |
| parser.add_option("--rewrite", dest="rewrites", | |
| action="append", help="Rewrite an import library FROM to TO", metavar="FROM:TO") | |
| options, args = parser.parse_args() | |
| if len(args) != 1: |
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
| # Adapt this script to debug why artifact installation might be failing | |
| using Pkg, Pkg.Artifacts, Pkg.BinaryPlatforms, Pkg.PlatformEngines | |
| # Initialize Pkg code | |
| probe_platform_engines!(; verbose=true) | |
| # Change these to whatever you need them to be, to debug your artifacts code | |
| artifacts_toml_url = "https://raw.githubusercontent.com/JuliaBinaryWrappers/HELICS_jll.jl/master/Artifacts.toml" | |
| artifact_name = "HELICS" |
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
| #!/bin/bash | |
| # Helper to jump to julia package source | |
| function jlj() | |
| { | |
| if [[ $# != 1 ]]; then | |
| echo "Usage: jlj <package name>" >&2 | |
| return | |
| fi |
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
| #!/bin/bash | |
| set -e | |
| set -x | |
| if [[ -z "$MACOS_CODESIGN_IDENTITY" ]]; then | |
| echo "ERROR: Must export MACOS_CODESIGN_IDENTITY" > &2 | |
| exit 1 | |
| fi | |
| # detach anything that's old |