Skip to content

Instantly share code, notes, and snippets.

View ozgurrgul's full-sized avatar

Ozgur ozgurrgul

View GitHub Profile
@itzikbenh
itzikbenh / TicketController.php
Last active March 9, 2022 14:43
Laravel server side processing for Datatables.
<?php
use Illuminate\Pagination\Paginator;
//This example is a bit more comlex since I have columns that are foreign keys of the Ticket table.
public function index(Request $request)
{
if($request->ajax()) {
$columns = ['tickets.id', 'client_name', 'location', 'priority_name', 'status_name', 'date'];
$draw = $request->draw;
$start = $request->start; //Start is the offset
$length = $request->length; //How many records to show
@orbitbot
orbitbot / http.js
Last active May 26, 2017 21:17
Ergonomic Mithril.js 1.x requests
// GET, POST, PUT, PATCH, DELETE, HEAD or OPTIONS
// data becomes querystring on GET requests
class Http {
constructor() {
let methods = ['get', 'post', 'put', 'patch', 'delete', 'head', 'options']
methods.forEach((method) => {
this[method] = (url, data, opts) => m.request(Object.assign({ method, url, data }, opts, this.eval(), this.defaults))
})
}
@TOMOAKI12345
TOMOAKI12345 / bitcoin_spv_wallet_overview.md
Created August 31, 2015 11:37
Bitcoin SPV Wallet Flow Overview

@extralam
extralam / Root.java
Last active July 31, 2018 09:57
Check Root or not
/**
* @author Kevin Kowalewski
*
*/
public class Root {
private static String LOG_TAG = Root.class.getName();
public boolean isDeviceRooted() {
if (checkRootMethod1()){return true;}