Skip to content

Instantly share code, notes, and snippets.

View laabroo's full-sized avatar

Ikhsyan Hasan laabroo

View GitHub Profile
/*
* Copyright 2013 Evelio Tarazona Cáceres <evelio@evelio.info>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
#!/bin/bash
#!/bin/sh
rpm -Uvh http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm &&
yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel freetype-devel speex-devel -y &&
mkdir ~/ffmpeg_sources &&
cd ~/ffmpeg_sources &&
curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz &&
tar xzvf yasm-1.3.0.tar.gz &&
cd yasm-1.3.0 &&
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" &&
@laabroo
laabroo / cara_instalasi_afftion
Last active August 29, 2015 14:17
Cara Instalasi Afftion
#PETUNJUK INSTALASI
===================
Update config di app/storage/config/config.php
Petunjuk pengisian:
> untuk penggunaan themes SINGLE STORE
* 'indexreq' diisi men atau women atau kids atau home
@laabroo
laabroo / simple-qury.php
Created April 21, 2012 10:13
Using Join Table on Code Igniter
//on model
function getUserDetails(){
$this->db->select('coment,name,dob,contry,main_photo');
$this->db->from('user');
$this->db->join('coment', 'coment.email = user.email');
$query = $this->db->get();
if ($query->num_rows() > 0) {
return $query->result();
}
@laabroo
laabroo / simple_hql
Created April 21, 2012 15:35
The simple query with hql.
//how to get user where name = laabroo
select u.name as name
from User u
where u.name = 'laabroo'
@laabroo
laabroo / ConvertJakson.java
Created April 21, 2012 16:14
Simple Convert Json with GSON
public class ConvertJakson {
private JsonData jsonData;
private Gson gson;
private String json;
public ConvertJakson() {
Log.i("Hasil Json : ", jsonData + "");
String data = objJson();
Log.i("ConvetJakson : ", data + "");
@laabroo
laabroo / OnCreate
Created June 16, 2012 07:39
Oncreate
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
initPosition();
initMap();
// initLocationManager();
}
@laabroo
laabroo / Place
Created June 16, 2012 06:49
Create Object Place and setter getter
@SuppressWarnings("serial")
public class Place implements Serializable {
public double lat;
public double lon;
public double rad;
public String name;
public String address;
public Place() {
@laabroo
laabroo / Interaktif
Created June 16, 2012 06:23
GetData From Server
public String loadData(double lat, double lon, double rad) {
httpGet = new HttpGet("http://laabroo.cu.cc/lokasi.php?lat=" + lat
+ "&lon=" + lon + "&rad=" + rad);
StringBuilder builder = new StringBuilder();
httpClient = new DefaultHttpClient();
try {
response = httpClient.execute(httpGet);
StatusLine statusLine = response.getStatusLine();
int statuscode = statusLine.getStatusCode();
if (statuscode == 200) {
@laabroo
laabroo / ParsingJson
Created June 16, 2012 06:37
Parsing Json From String
private void getAll(double lat, double lon, double rad) {
String posisis = loadData(lat, lon, rad);
Log.i("Posisi : ", posisis);
try {
JSONObject obj = new JSONObject(posisis);
JSONArray jsonArray = obj.getJSONArray("items");
for (int i = 0; i < jsonArray.length(); i++) {
JSONObject jsonObject = jsonArray.getJSONObject(i);