Skip to content

Instantly share code, notes, and snippets.

View cvializ's full-sized avatar
💭
🧙‍♂️

Carlos Vializ cvializ

💭
🧙‍♂️
View GitHub Profile
@cvializ
cvializ / index.html
Last active August 29, 2015 13:58
EMCVT Shopping Cart Error
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
.premiums h3 {
font-weight: bold;
text-decoration: underline;
}
curl -XDELETE 'http://localhost:9200/accesscontrol/'
curl -XPUT 'http://localhost:9200/accesscontrol/' -d '{
"mappings" : {
"group" : {
"properties" : {
"name" : { "type" : "string" },
"hosts" : { "type" : "string" }
}
},
"user" : {
@cvializ
cvializ / inconsistent_alias_filter.sh
Created May 9, 2014 16:38
This shows what I believe to be a bug causing inconsistent results in ElasticSearch 1.1.1
# Elasticsearch version 1.1.1
# Create the accesscontrol index
curl -XPUT 'http://localhost:9200/accesscontrol/'
# Create the user groups and specify which computers
# they may view logs for
curl -XPUT 'http://localhost:9200/accesscontrol/group/intern' -d '{
"name" : "intern",
"hosts" : ["computer1"]
}'
@cvializ
cvializ / Modular CSS with Susy and a nested context.html
Last active August 29, 2015 14:08
Generated by SassMeister.com.
<main>
<section class="containerComponent">
<div class="leaf containerComponent-leaf">
<label>Hello</label>
<input value="world" />
</div>
<div class="leaf containerComponent-leaf">
<label>Hello</label>
<input value="world" />
</div>
@cvializ
cvializ / Extending CSS with Susy and Breakpoint.html
Last active August 29, 2015 14:08
Generated by SassMeister.com.
<main>
<section class="containerComponent">
<div class="leaf containerComponent-leaf">
<label>Hello</label>
<input value="world" />
</div>
<div class="leaf containerComponent-leaf">
<label>Hello</label>
<input value="world" />
</div>
@cvializ
cvializ / Extending Modular CSS with Susy.html
Last active August 29, 2015 14:08
Generated by SassMeister.com.
<main>
<h1>Leaf components inside a container component:</h1>
<section class="containerComponent">
<div class="leaf containerComponent-leaf">
<label>Hello</label>
<input value="world" />
</div>
<div class="leaf containerComponent-leaf">
<label>Hello</label>
<input value="world" />
@cvializ
cvializ / Subclassing Modules in Modular CSS.html
Last active August 29, 2015 14:08
Generated by SassMeister.com.
<div class="pod">
<div class="pod-content">My cool content</div>
</div>
<div class="widget">
<div class="pod widget-pod">
<div class="pod-content">Cool Widget content</div>
</div>
</div>
@cvializ
cvializ / Typical Grid Layout with Susy.html
Last active August 29, 2015 14:09
Generated by SassMeister.com.
<div class="wrapper">
<main class="page-level">
<h1 class="title">Login Form</h1>
<form class="login-form">
<div class="field">
<label>Username</label>
<input />
</div>
<div class="field">
<label>Password</label>
@cvializ
cvializ / repair_transitionend.js
Last active January 20, 2016 18:59
A modified jQuery `$.fn.on` that checks for `transitionend` and proxies the callback to a `setTimeout`. This works around an issue in Safari where the `transitionend` event fails to fire under several circumstances, one of which being if the tab is not active. Raw
(function ($) {
$.fn.on = function (types, selector, data, fn, one) {
var type, origFn;
// Types can be a map of types/handlers
if ( typeof types === 'object' ) {
// ( types-Object, selector, data )
if ( typeof selector !== 'string' ) {
// ( types-Object, data )
data = data || selector;
@cvializ
cvializ / random_wikipedia_urls.sh
Created January 22, 2016 20:47
Grab a list of random Wikipedia URLs from the command line
for i in $(seq 1 20); do
curl -sIL http://en.wikipedia.org/wiki/Special:Random | perl -n -e '/^Location: (.*)$/ && print "$1\n"' | tail -n 1
done