This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[program:staging-echo-server] | |
process_name=%(program_name)s_%(process_num)02d | |
directory=/var/www/laravel-project-path | |
command=laravel-echo-server start | |
autostart=true | |
autorestart=true | |
user=www-data | |
numprocs=1 | |
redirect_stderr=true | |
stdout_logfile=/var/log/supervisor/laravel-project-staging.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
use Yajra\DataTables\DataTables; | |
class BookController extends Controller | |
{ | |
public function index() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="csrf-token" content="{{ csrf_token() }}"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link href="{{ mix('css/app.css') }}" rel="stylesheet"> | |
<title>DataTable Sample</title> | |
<!-- Fonts --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="csrf-token" content="{{ csrf_token() }}"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link href="{{ mix('css/app.css') }}" rel="stylesheet"> | |
<title>DataTable Sample</title> | |
<!-- Fonts --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HashMap<String, String> params = new HashMap<String, String>(); | |
float price = 15.0f; | |
int userId = 1; | |
String url = "greenroom.com.my/api/v1/price/update"; | |
//Construct signature and POST param | |
params.put("price", price); | |
params.put("user_id", userId); | |
Log.d("URL", url); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Remember to put the line below into your build.gradle's dependencies | |
//compile 'com.mcxiaoke.volley:library:1.0.15' | |
private void refreshWeather() { | |
RequestQueue queue = Volley.newRequestQueue(getActivity()); | |
String url = "http://api.openweathermap.org/data/2.5/forecast/daily?q=94043&mode=json&units=metric&cnt=7"; | |
JsonObjectRequest req = new JsonObjectRequest(url, null, new Response.Listener<JSONObject>() { | |
@Override | |
public void onResponse(JSONObject response) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <CommonCrypto/CommonDigest.h> | |
#include <CommonCrypto/CommonHMAC.h> | |
+(NSString*)generateSignature:(NSString*) dataToEncrypt{ | |
NSString *key = UserSecretKey; | |
NSString *data = dataToEncrypt; | |
const char *cKey = [key cStringUsingEncoding:NSASCIIStringEncoding]; | |
const char *cData = [data cStringUsingEncoding:NSASCIIStringEncoding]; |