Skip to content

Instantly share code, notes, and snippets.

Avatar

Maik B mediavrog

  • @shackersNFT
  • Germany / Japan
View GitHub Profile
@tdrozdowski
tdrozdowski / CORS_step1.scala
Last active Dec 27, 2015
Adding CORS Support via Filter to PlayFramework 2.2.1
View CORS_step1.scala
// 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
Extension of Volley's NetworkImageView that fades in images as they're loaded
View FadeInNetworkImageView.java
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;
View gist:3993270
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 Feb 19, 2012 — forked from trey/rails_bootstrap_delete_confirmation_modal.md
A nice delete confirmation modal in Rails courtesy of Bootstrap
View rails_bootstrap_delete_confirmation_modal.md

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')