This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------ all skip | |
"Material" | |
:save | |
{} | |
:commit | |
{} | |
:update | |
{} | |
------------------------ no skip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function CompatibilityCheck() { | |
hasWebGL ? mobile ? confirm("Please note that Unity WebGL is not currently supported on mobiles. Press Ok if you wish to continue anyway.") || window.history.back() : -1 == browser.indexOf("Firefox") && -1 == browser.indexOf("Chrome") && -1 == browser.indexOf("Safari") && (confirm("Please note that your browser is not currently supported for this Unity WebGL content. Try installing Firefox, or press Ok if you wish to continue anyway.") || window.history.back()) : (alert("You need a browser which supports WebGL to run this content. Try installing Firefox."), | |
window.history.back()); | |
} | |
function SetFullscreen(a) { | |
if ("undefined" == typeof JSEvents) return void console.log("Player not loaded yet."); | |
var b = JSEvents.canPerformEventHandlerRequests; | |
JSEvents.canPerformEventHandlerRequests = function() { | |
return 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Rack | |
class GzipHeader | |
def initialize(app, options = {}) | |
@app = app | |
@start_with = options[:start_with] || '/' | |
@end_with = options[:end_with] || '.gz' | |
end | |
def call(env) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module CarrierWave | |
module Gzip | |
extend ActiveSupport::Concern | |
module ClassMethods | |
def gzip_compress | |
process :gzip | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# config/initializers/extensions/active_record/attributes.rb | |
# https://github.com/rails/rails/blob/4-2-stable/activerecord/lib/active_record/attributes.rb | |
# | |
module ActiveRecord #:nodoc: | |
module Attributes # :nodoc: | |
module ClassMethods | |
# Overriding method | |
def columns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* FileInput < Formtastic::Inputs::FileInput | |
*/ | |
.attachment_wrap { | |
@extend p.inline-hints; | |
font-style: default; | |
display: block; | |
&.attachment_img img { | |
height: 80px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const aws = require('aws-sdk'); | |
const s3 = new aws.S3({apiVersion: '2006-03-01'}); | |
const node_zip = require('node-zip'); | |
const mime = require('mime-types'); | |
function lookup_mime( name ){ | |
console.log(name); | |
const mimetype = mime.lookup(name) || 'application/octet-stream'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rails.application.configure do | |
# Settings specified here will take precedence over those in config/application.rb. | |
# In the development environment your application's code is reloaded on | |
# every request. This slows down response time but is perfect for development | |
# since you don't have to restart the web server when you make code changes. | |
config.cache_classes = false | |
# Do not eager load code on boot. | |
config.eager_load = false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style> | |
a .invisible { | |
font-size: 0; | |
line-height: 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
$(document).ready(function(){ | |
var elements = ":input[readonly!=readonly]"; | |
$(elements).keypress(function(e) { | |
var c = e.which ? e.which : e.keyCode; | |
if (c == 13) { | |
var index = $(elements).index(this); | |
var criteria = e.shiftKey ? ":lt(" + index + "):last" : ":gt(" + index + "):first"; | |
$(elements + criteria).focus(); | |
e.preventDefault(); |