Skip to content

Instantly share code, notes, and snippets.

View peerax's full-sized avatar

peerathai puapan peerax

View GitHub Profile
@peerax
peerax / AprConfiguration.java
Created December 8, 2017 23:34 — forked from andreldm/AprConfiguration.java
APR on Spring Boot
import org.apache.catalina.LifecycleListener;
import org.apache.catalina.core.AprLifecycleListener;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.embedded.EmbeddedServletContainerFactory;
import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* NOTE: You also need to install APR on your system, on Arch Linux the package is called `tomcat-native`.
@peerax
peerax / APNSTest.rb
Last active August 29, 2015 14:13 — forked from vzqwer/APNSTest.rb
# Install APNS gem:
# sudo gem install APNS
require 'APNS'
# gateway.sandbox.push.apple.com is default
# APNS.host = 'gateway.push.apple.com' # Production
APNS.host = 'gateway.sandbox.push.apple.com' # Development
# this is also the default. Shouldn't ever have to set this, but just in case Apple goes crazy, you can.
APNS.port = 2195
//
// AppDelegate.swift
// pushtest
//
// Created by sawapi on 2014/06/08.
// Copyright (c) 2014年 sawapi. All rights reserved.
//
// iOS8用
import UIKit