Skip to content

Instantly share code, notes, and snippets.

View mediavrog's full-sized avatar

Maik B mediavrog

  • @shackersNFT
  • Germany / Japan
View GitHub Profile
@tdrozdowski
tdrozdowski / CORS_step1.scala
Last active December 27, 2015 19:49
Adding CORS Support via Filter to PlayFramework 2.2.1
// Create the Global class in your /app folder root package:
import play.api.{GlobalSettings, Play}
import play.api.Play.current
import play.api.mvc._
import scala.concurrent.Future
import scala.concurrent.ExecutionContext.Implicits.global
/**
@benvd
benvd / FadeInNetworkImageView.java
Created May 31, 2013 09:16
Extension of Volley's NetworkImageView that fades in images as they're loaded
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.drawable.*;
import android.util.AttributeSet;
import com.android.volley.toolbox.NetworkImageView;
public class FadeInNetworkImageView extends NetworkImageView {
private static final int FADE_IN_TIME_MS = 250;
package com.yokogoshi.line_intent_test;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@postpostmodern
postpostmodern / rails_bootstrap_delete_confirmation_modal.md
Created February 19, 2012 07:38 — forked from trey/rails_bootstrap_delete_confirmation_modal.md
A nice delete confirmation modal in Rails courtesy of Bootstrap

Here's what you get.

Some CoffeeScript (verbosely commented for clarity)

# Override Rails handling of confirmation

$.rails.allowAction = (element) ->
  # The message is something like "Are you sure?"
  message = element.data('confirm')