Skip to content

Instantly share code, notes, and snippets.

View k4zuki02h4t4's full-sized avatar
🏠
家で働く

K4ZUKI Otsuhata k4zuki02h4t4

🏠
家で働く
View GitHub Profile
(function (window) {
var hoverClass = "";
var tapClass = "";
var trigger = "";
var action = {};
if (Modernizr.touch){
action = {
"start":"touchstart",
"end": "touchend"
@k4zuki02h4t4
k4zuki02h4t4 / gist:584d91e79481689aca8c
Last active November 12, 2018 19:55 — forked from ColemanCollins/gist:6144525fcb3eda615a60
Change Twitter’s Heart Animation to Exploding Namahage.
.HeartAnimationContainer .HeartAnimation {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAC1QAAABkCAMAAAAM7mAaAAAC+lBMVEUAAABpYXPIkOsAAAAAAAAAAAACAADIhOoIBgYCAQAAAAAAAAAAAADNj/UAAADJoYMAAACWysbMj/bLkvTHuaoAAADMkPbNj/bMkfX+uDagycUAAAAAAAAAAAAFBQW0nesCAQCm2rDMTqXeN2DMkPXMj/ai6Lj0t1ztunDFkPaovvrgLkXLYLwAAAACAQCCrvHQoPfZlM7N1Jee2cej1NWW2en4uj3Mk/X1uTD/qzPFY8rXf77gLkXRacL0jqeV0feXuubQleaf4s/WbMFkm+Ww9pqeMOLSjrTovpGU5sG0w8XexIP/sjTdRoiV2rGMZijkLkf/NlDgoJ6gx/iSICwzn++/VNaX5sKY1+maZR6pTta26JPTnMnJx6HJrMWioqLqqmfoL0hynd/B6pDhKkuclsbtpjBXo+Kf5MDd11f/rTOJlvOgZ8zdRoj7wzar5JU8oO3L6oy8vNyps77eRojsl6XimKZYwZzGuovVm8+iNd/nvI8+x5bTasC306MqGwhFx5OfNeLaesuTwI0yn+/gLEakn75CrNo7yY2fT9bqykQqyo3/tTX/sDSblPNlm+vor5fLxJa9rPq4LThkQRONjY3qqmczr+J/f3+MHSvSliyYJC53ThipcCL/NU/qqDIkGAfMjvUAAADUar/dRojdLkT/NU/bK0PuMkn7M033M0znMEfzMUvrMEjfL0TjMEZNEBjSK0DEKDwoCAziJkgJAgLcJEX/tDT/O1XNJz3/wzj/zTyR0vqgIDLXIEM4DBH/rTOHHCl8fHyxJDarDCW8FTmM6MP/yDJ3FyVHDxXWMEAwCQ//vDVCDRSTHC5tGCFWEBlaPhH31DAtLwW5JjmRkZH/pD7XlSocCwdkFB/4kjd+CSq
@k4zuki02h4t4
k4zuki02h4t4 / http2-server-push.rb
Created September 8, 2016 05:11 — forked from tomfuertes/http2-server-push.rb
Rails HTTP2 Server Push via Header Link (on Cloudflare)
class ApplicationController < ActionController::Base
after_action :server_push_headers # https://twitter.com/connorjshea/status/728472354385317888
def server_push_headers
# CLoudflare HTTP2 Server Push: https://blog.cloudflare.com/announcing-support-for-http-2-server-push-2/
if request.format.html? # only on html pages
layout = self.send(:_layout) # with the right layout
if layout == "main" || layout == "speaker" || layout == "admin"
assets = [