Skip to content

Instantly share code, notes, and snippets.

Esteban Pastorino kitop

Block or report user

Report or block kitop

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kitop
kitop / README.md
Last active Feb 16, 2018 — forked from pyreta/playlists.md
New Playlist Features
View README.md

New Playlist Features

In addition to some visual differences (new icons, etc.), some new features have been added to the playlist folder tree:

1) Right-click to access dropdown menu + shortcuts

  • Dropdown menu is accessed by right-clicking instead of clicking gear icon
  • Shortcut icons now appear in place of gear icon. These shortcuts include:
    • Playlist Header: new folder, new playlist
    • Playlists: wrap, report, and share
    • Folders (owned): create playlist, sharing options
    • Folders (not owned): sharing details
View LinkList.elm
View app-assets-javascripts-elm-HelloWorld.js
const Elm = require("../../elm/HelloWorld.elm")
window.registerApp({ HelloWorld: Elm.HelloWorld })
@kitop
kitop / script.sh
Created Mar 31, 2017
Template Bash Script
View script.sh
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
# Taken from https://dev.to/thiht/shell-scripts-matter
#/ Usage:
#/ Description:
#/ Examples:
#/ Options:
@kitop
kitop / requerimientos.md
Last active Aug 29, 2015
angular on cuba - Rubyconf 2014
View requerimientos.md
@kitop
kitop / app.rb
Created Apr 11, 2014
nested routes
View app.rb
Cuba.define do
on "posts" do
run Posts
end
end
class Posts < Cuba
define do
on ":id" do |id|
post = Post[id]
@kitop
kitop / post-commit
Last active Jan 2, 2016
Git post commit hook to remind to precompile some assets
View post-commit
#!/bin/sh
#
# A hook script to remind us to precompile the assets.
color='\033[0;35m'
NC='\033[0m' # No Color
changes=$(git diff --name-only HEAD^)
@kitop
kitop / twitter-cards.liquid
Created Sep 16, 2013
Twitter Cards Snippet for Shopify Stores
View twitter-cards.liquid
{% comment %}
This is for widgets that share content on Twitter.
Twitter developer info: https://dev.twitter.com/docs/cards
Brought to you by Viralica http://viralica.com
{% endcomment %}
{% if template contains 'product' %}
<meta name="twitter:card" content="product">
<meta name="twitter:title" content="{{ product.title }}" />
<meta name="twitter:description" content="{{ product.description | strip_html | strip_newlines | truncatewords: 160, '' | escape }}" />
View products_controller.rb
class ProductsController < ApplicationController
def preview
begin
ActiveRecord::Base.transaction do
if request.referer =~ %r{/admin/products/(.+)/edit}
@product = Product.find($1)
@product.update_attributes(params[:product])
else
@product = Product.new(params[:product])
raise "Invalid" unless @product.valid?
View email_worker_spec.rb
require 'spec_helper'
# it's important to add the ':worker => true' setting so tests don't run in a transaction. This is configured in spec_helper
describe EmailWorker, :worker => true do
before(:each) do
@user = FactoryGirl.create :user
end
let(:worker){ EmailWorker.new }
You can’t perform that action at this time.