Skip to content

Instantly share code, notes, and snippets.

View korrio's full-sized avatar
👽

kOrriO korrio

👽
  • Hal Finney Co.,Ltd.
  • mempool
  • X @korrio
View GitHub Profile
public function show($order_id)
{
$query = Order::with([
"account",
"orderItems",
"orderItems.product",
"orderItems.product.category"
]);
//$order_id = Input::get("order_id");
@korrio
korrio / gist:b634f5ae9d80f5938313
Created December 2, 2015 13:50
Facebook Fetch (Page's post)
<?php
header('Content-Type: application/json');
$json = fetch();
//print_r($json["data"]);
$a = array();
/*
"id": 2510,
"author": "Adam Kool",
public final static int MSG_TYPE_TEXT = 0;
public final static int MSG_TYPE_FACE = 1; // sticker
public final static int MSG_TYPE_PHOTO = 2;
public final static int MSG_TYPE_CLIP = 3;
public final static int MSG_TYPE_LOCATION = 6;
public final static int MSG_TYPE_CONTACT = 7;
public final static int MSG_TYPE_VOICE = 8;
public final static int MSG_TYPE_DOODLE = 9;
{
"id": 15629,
"conversationId": 11,
"senderId": 6,
"message": "",
"messageType": 1,
"data": {
"stickerUrl": "http://something..."
},
"readCount": 0,
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<string>_(:з」∠)_</string>
<string>@ 'ェ' @</string>
<string>(^L^)</string>
<string>♪(´ε`)</string>
<string>(^O^)</string>
<string>∧( 'Θ' )∧</string>
@korrio
korrio / gist:85d641bf5c92a8edc187
Created December 25, 2015 09:28
Candychat API
//
// ApiManager.swift
// CandyChat
//
// ENDPOINT : api.candychat.net
// AUTHENTICATED ENDPONT : api.candychat.net/1.0
//
// POSTMAN (IMPORT BY URL)
// MAIN API (Handle User account / User management / Add friend) : https://www.getpostman.com/collections/bd7444d828fd7fe605c9
// CHAT API (Handle all chat activities) : https://www.getpostman.com/collections/bfc0758200b53637ae99
@korrio
korrio / gist:86c82389bb16c79ef59c
Created December 25, 2015 09:31
Test socketio connection and events
//
// TestSocketIO.swift
// CandyChat
//
import Foundation
class TestSocket: NSObject {
let socket = SocketIOClient(socketURL: SOCKET_END_POINT, options: [.Log(true), .ForcePolling(false)])
let replyMessage = "THIS IS SPARTANNNNN !!!!!!!!!!!!!!!"
@korrio
korrio / gist:3e54a23d538ac587f1ca
Created January 4, 2016 04:27
CustomEditText (with multiple typeface feature applied)
public class CustomEditText extends EditText {
public static final String TAG = "DroidWriter";
private static final int STYLE_BOLD = 0;
private static final int STYLE_ITALIC = 1;
private static final int STYLE_UNDERLINED = 2;
private ToggleButton boldToggle;
private ToggleButton italicsToggle;
private ToggleButton underlineToggle;
private ImageGetter imageGetter;
private boolean isDeleteCharaters = false;
// iOS Object
{
conversationId = 154;
data = (
);
message = "\U0e01\U0e2b\U0e1f\U0e01\U0e1f\U0e2b\U0e01\U0e2b\U0e01";
messageColorful = (
{
message = "\U0e01\U0e2b\U0e1f\U0e01\U0e1f\U0e2b\U0e01\U0e2b\U0e01";
@korrio
korrio / gist:1d2097401a68467163d2
Created January 26, 2016 12:47
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.candychat.net">
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />