Skip to content

Instantly share code, notes, and snippets.

@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
@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 / 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 / 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 / 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 / ISODateString.js
Created October 24, 2012 12:39
Convert a Date object to ISO-8601 format
function ISODateString(d){
function pad(n){return n<10 ? '0'+n : n}
return d.getUTCFullYear()+'-'
+ pad(d.getUTCMonth()+1)+'-'
+ pad(d.getUTCDate())+'T'
+ pad(d.getUTCHours())+':'
+ pad(d.getUTCMinutes())+':'
+ pad(d.getUTCSeconds())+'Z'}
@leotsem
leotsem / dabblet.css
Created January 9, 2012 01:05 — forked from chriscoyier/dabblet.css
Pure css buttons
.button {
border: 1px solid #DDD;
border-radius: 3px;
text-shadow: 0 1px 1px white;
box-shadow: 0 1px 1px #fff;
font: bold 11px Sans-Serif;
padding: 6px 10px;
white-space: nowrap;
vertical-align: middle;
color: #666;
@leotsem
leotsem / default.vcl.pl
Created September 27, 2011 23:07 — forked from rinaldifonseca/default.vcl.pl
A good varnish config for a Rails app
# https://www.varnish-cache.org/docs/2.1/tutorial/vcl.html
# https://www.varnish-cache.org/trac/wiki/VCLExamples
# Summary
# 1. Varnish will poll the backend at /health_check to make sure it is
# healthy. If the backend goes down, varnish will server stale content
# from the cache for up to 1 hour.
# 2. Varnish will pass X-Forwarded-For headers through to the backend
# 3. Varnish will remove cookies from urls that match static content file
# extensions (jpg, gif, ...)
@leotsem
leotsem / python-gitignore
Created September 12, 2011 21:42
Python .gitignore
*.py[co]
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
"""
This fabric file makes setting up and deploying a django application much
easier, but it does make a few assumptions. Namely that you're using Git,
Apache and mod_wsgi and your using Debian or Ubuntu. Also you should have
Django installed on your local machine and SSH installed on both the local
machine and any servers you want to deploy to.
_note that I've used the name project_name throughout this example. Replace
this with whatever your project is called._