Skip to content

Instantly share code, notes, and snippets.

@soulston
soulston / .zshrc
Last active October 13, 2015 23:58
.zshrc aliases
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# ZSH_THEME="st333f"
<article id="node-{{ node.nid }}" class="clearfix {{ attributes.class }}"{{ attributes }}>
<div class="test">This code should be output at the top of the node</div>
{{ title_prefix }}
{% if not page %}
<h2><a href="{{ node_url }}" rel="bookmark">{{ title }}</a></h2>
{% endif %}

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPad

Consumer key: CjulERsDeqhhjSme66ECg

import os
# here() gives us file paths from the root of the system to the directory
# holding the current file.
here = lambda * x: os.path.join(os.path.abspath(os.path.dirname(__file__)), *x)
PROJECT_ROOT = here("..")
# root() gives us file paths from the root of the system to whatever
# folder(s) we pass it starting at the parent directory of the current file.
root = lambda * x: os.path.join(os.path.abspath(PROJECT_ROOT), *x)
@soulston
soulston / code.php
Last active December 18, 2015 19:09
$titles = array();
foreach ($order->products as $product) {
$titles[] = $product->title;
}
// dpm($titles);
$titles = implode('<br />', $titles);
/**
* @file
* Provides special token to use with pathauto.
*
* http://drupal.org/node/1308488
*/
// We are using the sanitization functions from pathauto
require_once(drupal_get_path('module', 'pathauto') . '/pathauto.inc');
/**
* Override or insert variables into the node template.
*/
function MYTHEME_preprocess_node(&$variables) {
if ($variables['node']->type == 'article') {
kpr($variables['node']);
$node = $variables['node'];
if (isset($variables['node']->field_file)) {
$file = field_get_items('node', $node, 'field_file');
$file = reset($file);
THEME FUNCTION
function ln_funnelback_theme() {
return array(
'ln_funnelback_results' => array(
'arguments' => array('results' => NULL, 'pager' => NULL),
'template' => 'ln_funnelback_results',
),
'ln_funnelback_contextual_nav_block' => array(
'arguments' => array('summary' => NULL, 'contextual_nav' => NULL),
if bootUp.args.instanceType in ["All", "ebs-vol"]:
reportLines = []
mainLogger.info ("Looking for EBS Volumes in region: %s." % (region.name))
conEC2 = boto.ec2.connect_to_region (region.name,
aws_access_key_id=bootUp.args.awsAccessKey,
aws_secret_access_key=bootUp.args.awsSecretKey)
_funnelbackFetchDocIdByCsi
Add/Update - The server responded: 500
HTTP ERROR 500
Problem accessing /s/search.html. Reason:
Java heap space
Caused by:
java.lang.OutOfMemoryError: Java heap space