Skip to content

Instantly share code, notes, and snippets.

Robert Kummer rokde

Block or report user

Report or block rokde

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
rokde / DatePicker.vue
Last active Mar 13, 2018
Explanation of using v-model with two-way sync for input form controls within your own custom components.
View DatePicker.vue
<div class="date-picker">
Month: <input type="number" ref="monthPicker" :value="value.month" @input="updateDate()"/>
Year: <input type="number" ref="yearPicker" :value="value.year" @input="updateDate()"/>
export default {
props: ['value'],

Comparing Time Periods or Date Ranges with SQL


SELECT * FROM periods
WHERE range_start <= @check_period_end
  AND range_end >= @check_period_start

The opposite:

rokde / SlowQueryListeningOnLaravel4
Created Feb 11, 2015
Logging slow queries in Laravel environments (e.g. /app/start/[environment].php)
View SlowQueryListeningOnLaravel4
/** @var \Illuminate\Log\Writer $log */
$log = App::make('log');
DB::listen(function ($sql, $bindings, $time) use ($log) {
if ( ! starts_with($sql, 'select'))
// only log long running select statements
if ($time <= 1)
You can’t perform that action at this time.