Skip to content

Instantly share code, notes, and snippets.

View stomita's full-sized avatar

Shinichi Tomita stomita

View GitHub Profile
@stomita
stomita / build.sh
Last active October 5, 2015 00:38
#!/bin/bash
BUILDPACK_PREFIX=/app/vendor/phantomjs
PHANTOMJS_VERSION="1.9.1"
PHANTOMJS_DIR="phantomjs-${PHANTOMJS_VERSION}"
FONTCONFIG_VERSION="2.10.2"
FONTCONFIG_DIR="fontconfig-${FONTCONFIG_VERSION}"
mkdir -p ${BUILDPACK_PREFIX}
curl -L "http://fontconfig.org/release/fontconfig-${FONTCONFIG_VERSION}.tar.gz" | tar zxf -
#!/bin/bash
COMPILE_JOBS=1
PREFIX="/app/vendor/phantomjs"
QT_CFG="-I$PREFIX/include -L$PREFIX/lib"
until [ -z "$1" ]; do
case $1 in
"--qt-config")
(function() {
//
function someFuncInternallyUsed() {
// ...
}
$('#btnA').click(someFuncInternallyUsed);
$('#formA').submit(someFuncInternallyUsed);
})();
$(function() {
//
function someFuncInternallyUsed() {
// ...
}
$('#btnA').click(someFuncInternallyUsed);
$('#formA').submit(someFuncInternallyUsed);
});
<apex:page>
<apex:includeScript value="//ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.min.js" />
<apex:outputPanel>
<div class="ng-app">
<label>Name:</label>
<input type="text" ng-model="yourName" placeholder="Enter a name here" />
<hr />
<h1>Hello {{yourName}}!</h1>
</div>
</apex:outputPanel>
@stomita
stomita / edi-rama-take-back-your-city-with-paint.md
Created February 18, 2013 00:58
Gisted: Edi Rama: Take back your city with paint | Video on TED.com

Untitled Slide

Welcome to Glide.

Glide is the easiest way to create useful slide for all of your Gists.

  • input key <- to go backward.
  • input key -> to go forward.

Publishing

@stomita
stomita / S3FileList.page
Last active January 1, 2016 07:09
A Visualforce Page to dump SAML response
<apex:page showHeader="false"
standardStylesheets="false"
sidebar="false"
contentType="text/html"
applyBodyTag="false"
applyHtmlTag="false"
cache="true"
docType="html-5.0">
<html>
<head>
@stomita
stomita / cors-config.xml
Created December 24, 2013 07:43
S3 CORS configuration sample
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>DELETE</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
@stomita
stomita / S3FileList.page
Last active January 28, 2023 05:13
List S3 files in a bucket, using AWS JavaScript SDK with SAML assertion
<apex:page showHeader="false"
standardStylesheets="false"
sidebar="false"
contentType="text/html"
applyBodyTag="false"
applyHtmlTag="false"
cache="true"
docType="html-5.0">
<html>
<head>