Skip to content

Instantly share code, notes, and snippets.

@magnet88jp
magnet88jp / 0_reuse_code.js
Created December 19, 2013 08:43
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
package models
import play.api._
import play.api.db._
import play.api.Play.current
import play.api.libs.json._
import play.api.db.slick.DB
import play.api.db.slick.Config.driver.simple._
case class Todo(id: Option[Long] = None, content: String)
package models
import play.api._
import play.api.Play.current
import play.api.libs.json._
import play.api.db.slick.Config.driver.simple._
private[models] trait DAO extends TodosComponent {
val Todos = new Todos
}
public with sharing class SGDev1Util1 {
private static Map<Id, Set<Id>> userSetFromRoleMap;
private static Map<Id, Set<Id>> subordinateRoleSetFromRoleMap;
private static Map<Id, Id> parentRoleFromRoleMap;
private static Map<Id, Set<GroupMember>> groupMemberSetFromGroupMap;
private static List<UserRole> roleList;
private static Map<Id, Group> groupMap;
private static Map<Id, GroupMember> groupMemberFromGroupMap;
@magnet88jp
magnet88jp / output.html
Created July 12, 2014 14:43
web2lead output
<article id="post-41" class="post-41 page type-page status-publish hentry">
<header class="entry-header">
<h1 class="entry-title">Contact Us</h1>
</header><!-- .entry-header -->
<div class="entry-content">
<p>Salesforce Web2Lead サンプル</p>
<p><span style="color: #444444;"><div class="salesforce_w2l_lead">
<form id="sf_form_salesforce_w2l_lead_1" class="w2llead top-aligned" method="post" action="#salesforce_w2l_lead_1">
@magnet88jp
magnet88jp / .htaccess
Created July 12, 2014 15:42
for wordpress permalinks
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
@magnet88jp
magnet88jp / linearAxisRenderer-createTicks.js
Created August 15, 2014 10:13
jqplot.linearAxisRenderer.js createTicks meshod excerpt
// called with scope of axis
$.jqplot.LinearAxisRenderer.prototype.createTicks = function(plot) {
// we're are operating on an axis here
var ticks = this._ticks;
var userTicks = this.ticks;
var name = this.name;
// databounds were set on axis initialization.
var db = this._dataBounds;
var dim = (this.name.charAt(0) === 'x') ? this._plotDimensions.width : this._plotDimensions.height;
var interval;
@magnet88jp
magnet88jp / ui-modal.html
Created November 3, 2014 11:46
trial of angular-ui modal
<!DOCTYPE html >
<html ng-app="app">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="css/bootstrap.min.css">
<script src="js/angular.min.js"></script>
<script src="js/ui-bootstrap-tpls-0.11.2.min.js"></script>
</head>
<body ng-controller="AppCtrl">
<apex:page docType="html-5.0" showHeader="false" sidebar="false" standardStylesheets="false" >
<apex:stylesheet value="//cdn.jsdelivr.net/webjars/bootstrap-sf1/0.1.0-beta.6/css/bootstrap-namespaced.css"/>
<apex:includeScript value="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.11/angular.min.js"/>
<script>
angular.module("ngApp", []);
</script>
<div class="bootstrap" ng-app="ngApp">
<div class="container">