- Detach disk from VM
- Clone VM (fast!)
- Attach disk to new VM in 'multiattach' mode (On attaching, virtualbox creates a new differencing image tied to original disk)
- ...
- Profit!
This file contains 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
<?php | |
$content = 'Hello World'; | |
?> | |
<html> | |
<head> | |
<title>Demo page</title> | |
</head> | |
<body> | |
<?php echo $content; ?> |
This file contains 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
<?php | |
function jelly_tests_autoload($classname) | |
{ | |
$filename = __DIR__.'/tests/classes/'. strtolower(str_replace($classname, '_', '/'))).EXT; | |
if (file_exists($filename)) | |
require_once $filename; | |
} | |
if (TRUE /* If testing is enabled */) |
This file contains 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 inspect | |
class Instance(object): | |
"""docstring for Instance""" | |
def __init__(self, *args, **kwargs): | |
self.args = args | |
self.kwargs = kwargs | |
class ValueInstance(object): |
This file contains 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 | |
''' | |
From gdb 7 onwards, gdb's build can be configured --with-python, allowing gdb | |
to be extended with Python code e.g. for library-specific data visualizations, | |
such as for the C++ STL types. Documentation on this API can be seen at: | |
http://sourceware.org/gdb/current/onlinedocs/gdb/Python-API.html | |
This python module deals with the case when the process being debugged (the | |
"inferior process" in gdb parlance) is itself python, or more specifically, |
This file contains 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
f = open('file.txt', 'w') | |
f.write('hi') | |
f.close() | |
# Better | |
with open('file.txt', 'w') as f: | |
f.write('hi') | |
with pytest.raises(ValueError): | |
int('hi') |
This file contains 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
package main | |
/* | |
#import <dlfcn.h> | |
int | |
PreInit() { | |
void* cocoa_lib; | |
cocoa_lib = dlopen( "/System/Library/Frameworks/Cocoa.framework/Cocoa", RTLD_LAZY ); |
This file contains 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
diff --git c/lib/ansible/utils/__init__.py i/lib/ansible/utils/__init__.py | |
index 5da39ac..696f1a7 100644 | |
--- c/lib/ansible/utils/__init__.py | |
+++ i/lib/ansible/utils/__init__.py | |
@@ -33,7 +33,7 @@ from ansible.module_utils.splitter import split_args, unquote | |
import ansible.constants as C | |
import ast | |
import time | |
-import StringIO | |
+import cStringIO |
This file contains 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 re | |
import StringIO | |
import cStringIO | |
import contextlib | |
# caching the compilation of the regex used | |
# to check for lookup calls within data | |
LOOKUP_REGEX=re.compile(r'lookup\s*\(') |
This file contains 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 weakref | |
import threading | |
from twisted.python.threadpool import ThreadPool | |
from crochet import EventualResult | |
_blocked_pool_threads = weakref.WeakKeyDictionary() | |
_orig_pool_limits = weakref.WeakKeyDictionary() | |
_originals = {} |
OlderNewer