Skip to content

Instantly share code, notes, and snippets.

@inazt
inazt / page_ex.module.php
Created May 6, 2010 06:33
page_ex.module
<?php
function page_ex_menu() {
$items = array();
$items['admin/PageEx'] = array(
'title' => 'Page Example Title',
'description' => 'Page Decription',
// 'page callback' => 'nat',
'page callback' => 'drupal_get_form',
'page arguments' => array('natform'),
@inazt
inazt / page_ex.module
Created May 6, 2010 08:00
page_ex.info
name=Page Example
description = test module
core=6.x
version=0.1
@inazt
inazt / haskell02.hs
Created May 25, 2010 09:16
haskell02.hs
ghci> [1,2,3]
[1,2,3]
ghci> ["foo","bar","string"]
["foo","bar","string"]
ghci> [True,False]
[True,False]
-- enumeration notation
ghci> [1..5]
[1,2,3,4,5]
<html>
<head>
<title>Select Example</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
<?php
function genesis_siamensis_preprocess_page(&$vars, $hook) {
if(empty($vars['section_class'])) {
$section = 'front_page';
$vars['section_class'] = 'class="body front_page '. safe_string('section-'. $section) .'"';
}
}
?>
/* $Id: style.css,v 1.1.2.9 2009/05/22 08:46:11 jmburnz Exp $ */
/**
* @file style.css
*
* Use this file to override the Genesis core modular styles
* (such as the HTML elements in typography.css), module CSS
* and other Drupal styles. Anything that doesn't fit logically
* into page.css, nodes.css, blocks.css or comments.css can go here.
*/
@inazt
inazt / siamensis_logoutblock.php
Created July 20, 2010 06:36
siamensis_logoutblock.php #
<?php
?>
<script type="text/javascript">
function test() {
var selected = $("#shortcut-menu-id option:selected");
var output = "";
if(selected.val() != 0){
@inazt
inazt / url-shorten-generator.php
Created July 23, 2010 21:40
url-shorten-hash-generator
<?php
function getHash() {
$base=1000000;
$result = db_query_range('SELECT max(nid)+1 as nextId from {personal}', 0, 1);
$offset= db_fetch_object($result)->nextId;
$number=$base+$offset;
$out = "";
$codes = "abcdefghjkmnpqrstuvwxyz23456789ABCDEFGHJKMNPQRSTUVWXYZ";
while ($number > 53) {
@inazt
inazt / service.groovy
Created September 3, 2010 10:53 — forked from pphetra/service
Grails Service ZeroMQ
import org.springframework.beans.factory.InitializingBean
import org.zeromq.ZMQ
class ParseService implements InitializingBean {
def pullSocket
def pubSocket
def running = true
def pollingRate = 200