Skip to content

Instantly share code, notes, and snippets.

View stomita's full-sized avatar

Shinichi Tomita stomita

View GitHub Profile
#!/bin/sh
if ! [ -e $HOME/.root/tmp/.X1-lock ]; then
echo "X server not started. Starting..."
fakesu -c "Xvfb :1 -screen 0 1024x768x24 -nolisten tcp -shmem" &
fi
fakesu -c "phantomexec.sh $PWD $@"
#!/bin/sh
cd $1
shift
export DISPLAY=:1
phantomjs $@
@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>