Skip to content

Instantly share code, notes, and snippets.

@zaunaf
zaunaf / gist:6f234c5c93f0c95b120c
Created September 9, 2014 05:29
Extjs 3 - Barcode Reader Example
var barcodeWin = new Ext.Window({
title: 'Scan Barcode',
width: 220,
height: 110,
//minWidth: 300,
//minHeight: 200,
layout: 'fit',
plain: true,
bodyStyle: 'padding:5px;',
buttonAlign: 'center',
@zaunaf
zaunaf / MssqlSchemaParser.php
Created September 18, 2014 05:54
Correction on propel's generator/lib/reverse/mssql/MssqlSchemaParser.php (Foreign Key & Namespace issues).
<?php
/**
* This file is part of the Propel package.
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @license MIT License
*/
@zaunaf
zaunaf / schemaedit.php
Last active August 29, 2015 14:06
XML Editing Using PHP SimpleXML - Test case with Propel's schema.xml
<?php
try {
$projectDir = '/yourprojectfolder';
$appName = 'MyApp';
$schemaPath = $projectDir."/app/config/schema.xml";
if (!is_file($schemaPath)) {
throw new Exception("File $schemaPath gagal dibuka, proses reverse gagal..");
using System;
using System.Data;
using System.Data.SqlTypes;
using System.Data.SqlClient;
using Microsoft.SqlServer.Server;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Xml;
import Category from '../models/category';
import Meal from '../models/meal';
export const CATEGORIES = [
new Category('c1', 'Italian', '#f5428d'),
new Category('c2', 'Quick & Easy', '#f54242'),
new Category('c3', 'Hamburgers', '#f5a442'),
new Category('c4', 'German', '#f5d142'),
new Category('c5', 'Light & Lovely', '#368dff'),
new Category('c6', 'Exotic', '#41d95d'),