Skip to content

Instantly share code, notes, and snippets.

View joeartsea's full-sized avatar

Atsushi Kojo joeartsea

View GitHub Profile
@joeartsea
joeartsea / app.js
Created November 10, 2012 15:36
Postmark inbound app in Node.js
// Required modules.
var cradle = require('cradle');
var util = require('util');
var http = require('http');
// Config.
var config = require('./config');
// Variable to hold chunked data from Postmark.
var mailRaw = '';
@joeartsea
joeartsea / fck.php
Last active December 18, 2015 23:49
Fckeditor Helper (CakePHP1.1x) http://www.artsnet.jp/archives/711
<?php
vendor('fckeditor/fckeditor');
class FckHelper extends Helper {
var $helpers = array('Html', 'Form');
function textarea($fieldName, $options = array()) {
$defaultOptions = array(
'value' => $this->Html->tagValue($fieldName),
'width' => '100%',
<apex:page controller="ChatterInApexController">
<apex:form >
<apex:selectList value="{!communityId}" size="1">
<apex:selectOptions value="{!communityOptions}"/>
<apex:actionSupport event="onchange" rerender="feed"/>
</apex:selectList>
<apex:commandButton value="Post" action="{!postFeed}" />
</apex:form>
<apex:outputPanel id="feed">
package atsumatter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.servlet.http.*;
import twitter4j.Status;
package daibentter;
import java.io.IOException;
import java.util.Date;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.*;
import twitter4j.Status;
package daibentter;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@joeartsea
joeartsea / tutorial.js
Last active January 15, 2016 21:22
Dropbox Datastore API Example App of tutorial.js
// Insert your Dropbox app key here:
var DROPBOX_APP_KEY = 'xxxxxxxxxxx';
// Exposed for easy access in the browser console.
var client = new Dropbox.Client({key: DROPBOX_APP_KEY});
var taskTable;
$(function () {
// Insert a new task record into the table.
function insertTask(text) {
@joeartsea
joeartsea / Vagrantfile
Created July 18, 2013 10:37
Vagrant1.2 for EC2, Setting of Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "dummy"
config.vm.provider :aws do |aws, override|
aws.access_key_id = ENV['AWS_ACCESS_KEY_ID']
aws.secret_access_key = ENV['AWS_SECRET_ACCESS_KEY']
aws.keypair_name = "artsnet"
aws.instance_type = "t1.micro"
aws.region = "ap-northeast-1"
aws.ami = "ami-45a93e44"
@joeartsea
joeartsea / rhc setup
Last active December 19, 2015 22:59
rhc setup at OpenShift-Origin instance
# vagrant ssh
Last login: Tue Jun 11 10:56:13 2013 from 10.0.2.2
[vagrant@broker ~]$ rhc setup
OpenShift Client Tools (RHC) Setup Wizard
This wizard will help you upload your SSH keys, set your application namespace, and check that other programs like Git are properly
installed.
The server's certificate is self-signed, which means that a secure connection can't be established to 'broker.example.com'.
@joeartsea
joeartsea / Vagrantfile
Created July 23, 2013 20:59
Vagrant1.2 for EC2, Setting of Vagrantfile with omnibus plugin
Vagrant.configure("2") do |config|
config.vm.box = "dummy"
config.omnibus.chef_version = :latest
config.vm.provider :aws do |aws, override|
aws.access_key_id = ENV['AWS_ACCESS_KEY_ID']
aws.secret_access_key = ENV['AWS_SECRET_ACCESS_KEY']
aws.keypair_name = "artsnet"
aws.instance_type = "t1.micro"