Skip to content

Instantly share code, notes, and snippets.

@rohman
rohman / database.php
Created April 17, 2013 23:21
CodeIgniter ODBC Connection
<?php
$active_group = 'default';
$active_record = FALSE;
$db['default']['hostname'] = 'Driver={SQL Server};Server=127.0.0.1;Database=databasenya; Uid=sa;Pwd=sa;';
$db['default']['username'] = 'sa';
$db['default']['password'] = 'sa';
$db['default']['database'] = 'databasenya';
$db['default']['dbdriver'] = 'odbc';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = FALSE;
@rohman
rohman / sample_popup_yes_no.py
Last active December 4, 2019 10:08
make popup yes no with kivy
import kivy
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.gridlayout import GridLayout
from kivy.uix.popup import Popup
from kivy.properties import StringProperty
Builder.load_string('''
<ConfirmPopup>:
@rohman
rohman / sample_rest_with_kivy.py
Created April 3, 2013 11:52
Sample Rest With Kivy
from kivy.app import App
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.label import Label
from kivy.network.urlrequest import UrlRequest
class Example(FloatLayout):
def __init__(self, **kwargs):
super(Example, self).__init__(**kwargs)
@rohman
rohman / UlangSpringservice.java
Created April 11, 2013 23:47
Ulang Spring mvc Service MainClass
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ulang.springservice;
import id.web.rohman.ulangspringservice.model.Tamu;
import id.web.rohman.ulangspringservice.service.api.TamuService;
import java.sql.Connection;
import java.sql.SQLException;
@rohman
rohman / Page.php
Created December 2, 2013 11:16
L4 Blog Models Page.php
<?php namespace App\Models;
class Page extends Eloquent
{
protected $table = 'pages';
public function author()
{
return $this->belongsTo('User');
}
@rohman
rohman / CreatePagesTable.php
Last active December 30, 2015 00:09
L4 Blog Migration Create Pages Table
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePagesTable extends Migration {
/**
* Run the migrations.
*
@rohman
rohman / Article.php
Created December 2, 2013 11:15
L4 Blog Models Article.php
<?php namespace App\Models;
class Article extends Eloquent
{
protected $table = 'articles';
public function author()
{
return $this->belongsTo('User');
}
@rohman
rohman / composer
Created December 2, 2013 11:07
L4 Blog composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"laravel/framework": "4.0.*",
"cartalyst/sentry": "2.0.*",
"dflydev/markdown": "v1.0.2",
"imagine/Imagine": "v0.4.1"
@rohman
rohman / CreateArticleTable.php
Last active December 30, 2015 00:09
L4 Blog Migration Create Article Table
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateArticlesTable extends Migration {
/**
* Run the migrations.
*
@rohman
rohman / ng-filter.html
Created June 5, 2013 11:43
Contoh penggunaan ng-filter & ng-repeat
<!DOCTYPE html>
<html>
<head>
<title>Angular Binding</title>
<link rel="stylesheet" href="assets/foundation/foundation.css" />
</head>
<body>
<div ng-app="MyApp">
<div ng-controller="AvengerCtrl">
<input type="text" ng-model="search.$"/>