Skip to content

Instantly share code, notes, and snippets.

@leotsem
leotsem / plugin.php
Created November 15, 2013 16:07 — forked from ocean90/plugin.php
/**
* Add a X-XSS-Protection = 0 header for post previews to allow
* Webkit browsers to render iframe and flash objects.
* @see: http://core.trac.wordpress.org/ticket/20148
*
* @param $headers array Already added header items.
* @param $object WP The query variables.
*
* @return array
*/
@leotsem
leotsem / gist:f2aa1f1539d0fc2485e9
Created May 28, 2015 15:57
AWS Codeploy stacktrace
2015-05-26 18:22:17 WARN [codedeploy-agent(4100)]: InstanceAgent::Plugins::CodeDeployPlugin::HookExecutor: Script at specified location: provision/deploy/after_install is not executable. Trying to make it executable.
2015-05-26 18:22:32 ERROR [codedeploy-agent(4100)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Error during perform: Encoding::InvalidByteSequenceError - "\xCE" on US-ASCII - /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/hook_executor.rb:55:in `encode'
/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/hook_executor.rb:55:in `to_json'
/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/hook_executor.rb:55:in `to_json'
/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_poller.rb:128:in `gather_diagnostics_from_script_error'
/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_poller.rb:68:in `rescue in perform'
/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_poller.rb:53:in `perform'
/opt/codedeploy-
@leotsem
leotsem / circle.yml
Created October 15, 2017 23:38
Circle CI config for react native apps using jest
machine:
environment:
YARN_VERSION: 0.18.1
PATH: "${PATH}:${HOME}/.yarn/bin:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"
dependencies:
pre:
- |
if [[ ! -e ~/.yarn/bin/yarn || $(yarn --version) != "${YARN_VERSION}" ]]; then
echo "Download and install Yarn."
@leotsem
leotsem / dabblet.html
Created November 22, 2017 19:25
Untitled
<div style="margin-top: 350px; font-size: 100px; text-align:center; font-family:Arial; font-weight: bold">Enjoy the journey</div
@leotsem
leotsem / dabblet.html
Last active December 4, 2017 18:18 — forked from anonymous/dabblet.html
Untitled
<div style="margin-top: 350px; font-size: 100px; text-align:center; font-family:Arial; font-weight: bold">test2</div