Skip to content

Instantly share code, notes, and snippets.

Jean-Paul Calderone exarkun

Block or report user

Report or block exarkun

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:6f1b7cfb3fdd256049e3d1da11bccc60
diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix
index 35ae59af617..d8ee00fa5af 100644
--- a/pkgs/development/tools/build-managers/meson/default.nix
+++ b/pkgs/development/tools/build-managers/meson/default.nix
@@ -4,6 +4,8 @@ python3Packages.buildPythonApplication rec {
version = "0.46.1";
pname = "meson";
+ junk = builtins.trace ("${stdenv.buildPlatform.config} ${stdenv.hostPlatform.config} ${stdenv.targetPlatform.config}") "junk";
+
View gist:d98db679754a32bb3e31145e9fd727db
exarkun@baryon:~$ virtualenv /tmp/webdigestthing
Using base prefix '/usr'
New python executable in /tmp/webdigestthing/bin/python3
Also creating executable in /tmp/webdigestthing/bin/python
Installing setuptools, pip, wheel...done.
exarkun@baryon:~$ rm -rf /tmp/webdigestthing/
exarkun@baryon:~$ virtualenv --python=python2 /tmp/webdigestthing
Running virtualenv with interpreter /usr/bin/python2
New python executable in /tmp/webdigestthing/bin/python2
Also creating executable in /tmp/webdigestthing/bin/python
View gist:41998ee82c61f31ec499dcd9bb9298c7
[-Wdeferred-type-errors]
• Couldn't match type ‘GHC.IO.Exception.IOException’
with ‘ServantErr’
arising from a functional dependency between:
constraint ‘Control.Monad.Error.Class.MonadError ServantErr IO’
arising from a use of ‘throwError’
instance ‘Control.Monad.Error.Class.MonadError
GHC.IO.Exception.IOException IO’
at <no location info>
• In the expression: throwError invalidPlanErr
View master
# This configuration file is used to manage the behavior of the Salt Master.
# Values that are commented out but have an empty line after the comment are
# defaults that do not need to be set in the config. If there is no blank line
# after the comment then the value is presented as an example and is not the
# default.
...
# Salt supports a modular fileserver backend system, this system allows
# the salt master to link directly to third party systems to gather and
# manage the files available to minions. Multiple backends can be
# configured and will be searched for the requested file in the order in which
View gist:1da83249faacc0f58f7a798780665302
>> Issue: [B603:subprocess_without_shell_equals_true] subprocess call - check for execution of untrusted input.
Severity: Low Confidence: High
Location: telepresence/container.py:173
172 docker_command += docker_args
173 p = Popen(docker_command)
View tahoe-lafs-client.py
from __future__ import unicode_literals, print_function
from functools import partial
from itertools import count
from random import randrange
from tempfile import mktemp
from sys import stdout
from twisted.internet.defer import Deferred
from twisted.internet.task import deferLater, react
View gist:8cd106c7e10e478f7ed058dc48dafc7b
Traceback (most recent call last):
File "/app/env/bin/txflashair-sync", line 6, in <module>
from pkg_resources import load_entry_point
File "/app/env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 18, in <module>
from __future__ import absolute_import
ImportError: No module named __future__
@exarkun
exarkun / gist:e37972e305cb83e10d6ba633e7d82315
Created Sep 12, 2017
test_publish_after_config_change
View gist:e37972e305cb83e10d6ba633e7d82315
diff --git a/src/allmydata/test/mutable/test_update.py b/src/allmydata/test/mutable/test_update.py
index 5001853..6ffa9c9 100644
--- a/src/allmydata/test/mutable/test_update.py
+++ b/src/allmydata/test/mutable/test_update.py
@@ -129,6 +129,30 @@ class Update(GridTestMixin, unittest.TestCase, testutil.ShouldFailMixin):
self.fail("didn't get expected data")
+ def test_publish_after_config_change(self):
+ d0 = self.do_upload_mdmf()
View gist:2ad27ecd63acccdc53511ef2e6137157
(leastauthority.com) exarkun@baryon:~/Work/LeastAuthority/leastauthority.com/docker$ python -m TheseusHook -o /tmp/theseus.stats $(type -p tahoe) --help
Exception TypeError: 'isinstance() arg 2 must be a class, type, or tuple of classes and types' in <function remove at 0x7f210e8b2668> ignored
Exception TypeError: 'isinstance() arg 2 must be a class, type, or tuple of classes and types' in <function _remove at 0x7f210e5be1b8> ignored
Exception TypeError: 'isinstance() arg 2 must be a class, type, or tuple of classes and types' in <function _remove at 0x7f2112edfb90> ignored
(leastauthority.com) exarkun@baryon:~/Work/LeastAuthority/leastauthority.com/docker$ cat TheseusHook.py
import runpy
def main():
from sys import argv
assert argv[1] == b"-o"
View gist:8cb1fd05f3af2207e4763269b272c111
$ python -m TheseusHook -o /tmp/theseus.stats $(type -p tahoe) --help
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/exarkun/Work/LeastAuthority/leastauthority.com/docker/TheseusHook.py", line 16, in <module>
main()
File "/home/exarkun/Work/LeastAuthority/leastauthority.com/docker/TheseusHook.py", line 12, in main
t.install(trace_file)
You can’t perform that action at this time.