Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* MMJDB Google docs form embedding
**/
function mmjdb_some_form(){
if(is_page('page_slug')){
echo '<iframe src="https://docs.google.com/spreadsheet/embeddedform?formkey=dE1GWmZYTDNpSG5CSkVRZWgtc0JyWHc6MQ" width="906" height="790" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>';
}
}
@mmhan
mmhan / gist:5127558
Last active December 14, 2015 18:09
<?php
// Let's say $result is the data that you want to show with pagination.
//First get all the NRs of the result
$nr = Set::extract("{n}.AF.NR", $data);
//Then get the names of all the companies for the given NR
$companies = $this->FIRMA->find('list', array('conditions' => array("NR" => $nr) ) );
?>
@mmhan
mmhan / MCAPI.php
Created December 26, 2012 07:50 — forked from anonymous/MCAPI.php
<?php
class MCAPI {
var $version = "1.3";
var $errorMessage;
var $errorCode;
/**
* Cache the information on the API location on the server
*/
The following was taken from Firebug's Net panel's POST tab.
This is how flash posted the data for entries/customize
--kysqyjqwoxedwqdyyutnftnihuuproui
Content-Disposition: form-data; name="title"
title
--kysqyjqwoxedwqdyyutnftnihuuproui
@mmhan
mmhan / UserAccessLogTest.java
Created June 8, 2012 11:08 — forked from anonymous/UserAccessLogTest.java
Reading the input from logfile. Printing the unique login ID from the past 10 mins.
import java.util.*;
import java.io.*;
import java.util.StringTokenizer;
public class UserAccessLogTest extends GenericTest
{
private String filePath ="";
public UserAccessLogTest(String args[])
{
MyanmarCarsDB.com is a classified cars listing site for Myanmar Car Market. We provide the number one online advertising services for buyers, sellers, agents, dealers and importers.
Instantly advertise cars to sell or find your dream cars in a few clicks.
@mmhan
mmhan / git-extract.sh
Created March 8, 2012 08:47 — forked from StanAngeloff/git-extract.sh
Get those changed files out of Git
#!/bin/bash
BOLD="\033[1m"
_BOLD="\033[22m"
RED="\033[31m"
YELLOW="\033[33m"
GREEN="\033[32m"
RESET="\033[39m"
range=$1
SELECT `p`.`code`, `p`.`building_num`, `w`.`building_number`, `s`.`name`, `b`.`name` FROM postcodes AS `p`
LEFT JOIN `streets` AS `s` ON (`p`.`street_key` = `s`.`id`)
LEFT JOIN `buildings` AS `b` ON (`p`.`building_key` = `b`.`id`)
LEFT JOIN `walkups` AS `w` ON (`w`.`postalcode` = `p`.`code`);
@mmhan
mmhan / database.h
Created January 31, 2012 03:44
Sample Database
//
// Database.h
// ChanelVIP
//
// Created by Mike Han on 1/12/12.
// Copyright (c) 2012 Comwerks Interactive. All rights reserved.
//
#import <Foundation/Foundation.h>
@mmhan
mmhan / dabblet.css
Created January 6, 2012 20:20 — forked from anonymous/dabblet.css
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
html, body{
height: 100%;
}
.content_botbg{
background: #eeeeee;
background: -moz-linear-gradient(top, #eeeeee 0%, #ededed 16%, #e5e5e5 43%, #dddddd 57%, #d0d0d0 73%, #d0d0d0 75%, #cccccc 77%, #b7b7b7 100%);