Skip to content

Instantly share code, notes, and snippets.

Avatar

Jamie Counsell jamiecounsell

View GitHub Profile
View gist:a3988d56965d81d1a4b0
CONNECTED(00000003)
write to 0x9df8040 [0x9df8098] (121 bytes => 121 (0x79))
[REDACTED]
read from 0x9df8040 [0x9dfd5f8] (7 bytes => 7 (0x7))
[REDACTED]
read from 0x9df8040 [0x9dfd5ff] (79 bytes => 79 (0x4F))
[REDACTED]
read from 0x9df8040 [0x9dfd5f8] (5 bytes => 5 (0x5))
[REDACTED]
read from 0x9df8040 [0x9dfd5fd] (3226 bytes => 3226 (0xC9A))
@jamiecounsell
jamiecounsell / url_build.py
Created Oct 3, 2015
Django urlpatterns to dictionary for easy JSON serialization (redacting `/admin/` urls)
View url_build.py
def recursively_build__url_dict(d, urlpatterns):
for i in urlpatterns:
if isinstance(i, RegexURLResolver):
d[str(i.__dict__['_regex'])] = {}
if str(i.__dict__['_regex']) != "^admin/":
recursively_build__url_dict(
d[str(i.__dict__['_regex'])], i.url_patterns
)
else:
d[str(i.__dict__['_regex'])] = "REDACTED"
@jamiecounsell
jamiecounsell / install_python.sh
Last active Jun 14, 2016 — forked from andriisoldatenko/install_python.sh
Install local Python 2.7.10 on CentOS 7
View install_python.sh
TMP_PATH=~/tmp_install_python
# Versions section
PYTHON_MAJOR=2.7
PYTHON_VERSION=$PYTHON_MAJOR.10
mkdir $TMP_PATH && cd $TMP_PATH
# Update yum and libraries
yum -y update
@jamiecounsell
jamiecounsell / error.txt
Created Jul 15, 2016
TypeError: <method-wrapper '__ne__' of type object at 0x1eeab80> is not a Python function
View error.txt
2016-07-15 03:14:14,050:DEBUG:certbot.main:Root logging level set at 30
2016-07-15 03:14:14,050:INFO:certbot.main:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2016-07-15 03:14:14,050:WARNING:certbot.cli:You are running with an old copy of certbot that does not receive updates, and is less reliable than more recent versions. We recommend upgrading to the latest certbot-auto script, or using native OS packages.
2016-07-15 03:14:14,058:DEBUG:certbot.main:certbot version: 0.8.1
2016-07-15 03:14:14,058:DEBUG:certbot.main:Arguments: []
2016-07-15 03:14:14,058:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#webroot,PluginEntryPoint#null,PluginEntryPoint#manual,PluginEntryPoint#standalone)
2016-07-15 03:14:14,065:DEBUG:certbot.plugins.selection:Requested authenticator None and installer None
2016-07-15 03:14:14,363:DEBUG:certbot.plugins.selection:Multiple candidate plugins: * webroot
Description: Place files in webroot directory
Interfaces: IAuthenticator, IPlugin
View gist:bf360b1d8e75b3e09b415bf361cec6f5
SIZE=4; sudo dd if=/dev/zero of=/swapfile bs=1024 count=`expr $SIZE \* 1024000` && sudo mkswap /swapfile && sudo sh -c 'echo "/swapfile none swap sw 0 0" >> /etc/fstab' && sudo chmod 600 /swapfile && sudo swapon /swapfile;
@jamiecounsell
jamiecounsell / gist:06937e04dd25267f7393
Created Feb 1, 2015
Pillow dependency install for Debian
View gist:06937e04dd25267f7393
sudo apt-get install libjpeg62-dev zlib1g-dev libtiff-opengl libtiff-tools libfreetype6-dev liblcms1-dev libopenjpeg-dev tcl-dev tk-dev
pip install -I pillow
View stacktrace.txt
Error during include of component '/apps/myapp/components/cqsearch/sitesearchcontroller'
Error Message:
org.apache.sling.api.scripting.ScriptEvaluationException: org.apache.sling.scripting.jsp.jasper.JasperException: File "/META-INF/tags/helloWorld.tagx" not found
Processing Info:
Page = /content/myapp/en/search-results
Resource Path = /content/myapp/en/search-results/jcr:content/searchControllerParsys/sitesearchcontroller