Skip to content

Instantly share code, notes, and snippets.

View musl-julia-noBB.log
Warning: git information unavailable; versioning information limited
Warning: git information unavailable; versioning information limited
Warning: git information unavailable; versioning information limited
Warning: git information unavailable; versioning information limited
Warning: git information unavailable; versioning information limited
Warning: git information unavailable; versioning information limited
PERL base/pcre_h.jl
PERL base/errno_h.jl
CC usr/lib/libccalltest.so
FLISP src/julia_flisp.boot
View eglot-jl-events-issue-14.el
[client-request] (id:1) Wed May 20 19:46:53 2020:
(:jsonrpc "2.0" :id 1 :method "initialize" :params
(:processId 1689 :rootPath "/Users/evar/Base/_Code/uni/stochastic/" :rootUri "file:///Users/evar/Base/_Code/uni/stochastic/" :initializationOptions nil :capabilities
(:workspace
(:applyEdit t :executeCommand
(:dynamicRegistration :json-false)
:workspaceEdit
(:documentChanges :json-false)
:didChangeWatchedFiles
(:dynamicRegistration t)
View events.el
client-request (id:1) Thu May 7 11:20:43 2020:
(:jsonrpc "2.0" :id 1 :method "initialize" :params
(:processId 1241 :rootPath "/home/adam/tmp/" :rootUri "file:///home/adam/tmp/" :initializationOptions nil :capabilities
(:workspace
(:applyEdit t :executeCommand
(:dynamicRegistration :json-false)
:workspaceEdit
(:documentChanges :json-false)
:didChangeWatchedFiles
(:dynamicRegistration t)
View printfwrap.jl
using Printf
struct FWrapper
val::Float64
end#struct
Base.show(io::IO, f::FWrapper) = @printf(io, "%E", f.val)
x = [1.2E-9, 0.03]
xwrap = FWrapper.(x)
@non-Jedi
non-Jedi / isnothing_replacement.jl
Created May 8, 2019
Script used as first pass on converting https://github.com/GiovineItalia/Gadfly.jl/pull/1278 from using "isnothing" to using "=== nothing". Didn't work perfectly, but it was close.
View isnothing_replacement.jl
import CSTParser: EXPR, Call, IDENTIFIER
import DocumentFormat: Edit, apply, pass, State
isnothing_pass(x, state) = nothing
function isnothing_pass(x::EXPR{Call}, state)
if length(x) === 4 # filter out calls like myfunction()
id, p1, contents, p2 = x
if id isa IDENTIFIER && id.val == "isnothing"
push!(state.edits, Edit(state.offset+1:state.offset+id.fullspan+1, ""))
@non-Jedi
non-Jedi / benchmark.jl
Created Mar 16, 2019
Benchmarking HTTP.jl
View benchmark.jl
using HTTP
abstract type DummyConnectionLayer{Next <: HTTP.Layer} <: HTTP.Layer end
st = HTTP.RedirectRequest.RedirectLayer{HTTP.MessageRequest.MessageLayer{
HTTP.RetryRequest.RetryLayer{HTTP.ExceptionRequest.ExceptionLayer{
DummyConnectionLayer{Union{}}}}}}
uri = HTTP.URI("https://example.com/random/path?query=param&foo=bar")
headers = HTTP.Headers()
View gist:0e3f77681bb469a294596531136a8069
make prefix=/usr sysconfdir=/etc USE_SYSTEM_LLVM=1 USE_LLVM_SHLIB=1
Warning: git information unavailable; versioning information limited
Warning: git information unavailable; versioning information limited
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 497 100 497 0 0 1956 0 --:--:-- --:--:-- --:--:-- 1956
100 152k 100 152k 0 0 192k 0 --:--:-- --:--:-- --:--:-- 1218k
rm: cannot remove 'scratch/utf8proc-97ef668b312b96382714dbb8eaac4affce0816e6/': No such file or directory
ar: creating libutf8proc.a
View offtopic_reset.py
from matrix_client.client import MatrixClient
client = MatrixClient("https://matrix.org", token="sekrit_token", user_id="@skavrate:matrix.org")
offtopic = client.rooms["!UcYsUzyxTGDxLBEvLz:matrix.org"]
offtopic.modify_user_power_levels({"Half-Shot:half-shot.uk": 100,
"skaverat:skaverat.net": 100})
You can’t perform that action at this time.