Skip to content

Instantly share code, notes, and snippets.

{
"title": "D/K to Left/Right Shift When Held",
"author": "Jason Welch(jwelchdesign.com)",
"homepage": "https://gist.github.com/calebporzio/2d07cd0e3013e7eaf16f5a2ea4f594ae",
"import_url": "://karabiner/assets/complex_modifications/import?url=https://gist.githubusercontent.com/calebporzio/2d07cd0e3013e7eaf16f5a2ea4f594ae/raw/08c397b09fbaa5ec90cf161e5bca97bdb43e8c55/caps_lock_to_command_escape.json",
"rules": [
{
"description": "D/K to Left/Right Shift When Held",
"manipulators": [
{
@jdubwelch
jdubwelch / indention.php
Last active April 22, 2020 03:52
Just some code that i might want to share.
<?php
class Foo
{
private function test()
{
$query['body']['aggs'] = [
'avg_price_per_month' => [
'date_histogram' => [
'field' => 'metaFields.soldDate',
private function test()
{
$query['body']['aggs'] = [
'avg_price_per_month' => [
'date_histogram' => [
'field' => 'metaFields.soldDate',
'interval' => 'month',
'format' => 'M/d/YYYY'
],
[
@jdubwelch
jdubwelch / Vim.md
Last active April 3, 2019 19:29
My notes about Vim.
javascript:
(function(){
var idxID, listingID;
idxID=prompt("MLS (or both):");
var regex = /(?<idxID>[a-z]{1}[0-9]{3})(\/|::listing::)(?<listingID>.*)/gm;
if (match = regex.exec(idxID)) {
idxID = match.groups.idxID;
listingID = match.groups.listingID;
@jdubwelch
jdubwelch / Preferences.sublime-settings
Last active August 8, 2016 15:47
My SublimeText 3 Settings... in case I ever delete them.
{
// User Interface Settings
"theme": "Material-Theme.sublime-theme",
"material_theme_small_statusbar": true,
"material_theme_compact_sidebar": true,
"material_theme_tree_headings": true,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"overlay_scroll_bars": "enabled",
"translate_tabs_to_spaces": true,
"caret_style": "phase",
@jdubwelch
jdubwelch / Show-all-errors.php
Last active September 20, 2017 21:34
In PHP or Laravel and a type-hint is incorrect is display a blank page and is very difficult to trouble shoot even though display_errors may be on. This snippet found from Stack Overflow made the error display and saved my bacon.
<?php
// ----------------------------------------------------------------------------------------------------
// - Display Errors
// ----------------------------------------------------------------------------------------------------
ini_set('display_errors', 'On');
ini_set('html_errors', 0);
// ----------------------------------------------------------------------------------------------------
// - Error Reporting
@jdubwelch
jdubwelch / ctags
Created November 17, 2014 19:55
Ctags command for php project
ctags -R -f .tags --regex-php='/^[ \t]*trait[ \t]+([a-z0_9_]+)/\1/t,traits/i' --regex-php='/abstract class ([^ ]*)/\1/c/' --regex-php='/interface ([^ ]*)/\1/c/' --regex-php='/(public |static |abstract |protected |private )+ function +([^ \(]*)/\2/f/' --exclude=.git --exclude=.svn --exclude=node_modules
@jdubwelch
jdubwelch / SassMeister-input.scss
Created November 7, 2014 23:05
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
@function color-diff($color-a, $color-b) {
$hue: hue($color-a) - hue($color-b);
$saturation: saturation($color-a) - saturation($color-b);
$lightness: lightness($color-a) - lightness($color-b);
@jdubwelch
jdubwelch / BaseModel.php
Last active February 3, 2016 00:53
Multiple Database on Different Servers Laravel Solution
<?php
use Eloquent;
class BaseModel extends Eloquent {
/**
* The default connection
*/
protected $connection = 'db1-mysql';