Skip to content

Instantly share code, notes, and snippets.

View ilanco's full-sized avatar

Ilan Cohen ilanco

  • Tel Aviv, Israel
View GitHub Profile
@ilanco
ilanco / obsidian-daily-note-template.md
Last active March 25, 2024 07:24
Daily Note Template for Obsidian. Uses Templater plugin. Should be saved as a Markdown file in Obsidian.
created tags
<% tp.file.creation_date() %>
DailyNotes

[[Diary/<% tp.date.now("YYYY", -1) %>/<% tp.date.now("MM-MMMM", -1) %>/<% tp.date.now("YYYY-MM-DD-dddd", -1) %>|<< Yesterday]] | [[Diary/<% tp.date.now("YYYY", 1) %>/<% tp.date.now("MM-MMMM", 1) %>/<% tp.date.now("YYYY-MM-DD-dddd", 1) %>|Tomorrow >>]]

<% moment(tp.file.title,'YYYY-MM-DD').format("dddd, MMMM DD, YYYY") %>


{
"mongod_pre44": {
"title": "MongoDB server log format",
"regex": {
"main": {
"pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}[,\\.]\\d+[\\+-Z](\\d+)?)\\s+(?<level>\\w)\\s+(?<component>\\w+|-)\\s+\\[?(?<context>-*[^\\0]+?)?\\]\\s+(?<body>[^\\0]*)$"
},
"customdate": {
"pattern": "^(?<timestamp>[A-Z][a-z]{2} [A-Z][a-z]{2} [\\d\\s]+ \\d{2}:\\d{2}:\\d{2}[,\\.]\\d+)\\s+(?<level>\\w)\\s+(?<component>\\w+|-)\\s+\\[?(?<context>-*[^\\0]+?)?\\]\\s+(?<body>[^\\0]*)$"
}
@ilanco
ilanco / salesforce-lightning-ui.user.js
Last active March 2, 2022 14:25
Salesforce Ligntning UI
// ==UserScript==
// @name Salesforce Lightning UI
// @namespace http://tampermonkey.net/
// @description Salesforce Lightning UI Custom Tweaks
// @include https://*.lightning.force.com/lightning/*/Case/*
// @author ilanco
// @license MIT
// @version 0.05
// @updateURL https://gist.githubusercontent.com/ilanco/c7142cc658bd66066b83fc035cfb6494/raw/salesforce-lightning-ui.user.js
// @downloadURL https://gist.githubusercontent.com/ilanco/c7142cc658bd66066b83fc035cfb6494/raw/salesforce-lightning-ui.user.js
@ilanco
ilanco / mongod-post44.json
Last active August 10, 2022 07:38
lnav log format for MongoDB 4.4+ (post) and 4.2- (pre)
{
"mongod_post44": {
"title": "MongoDB 4.4 Log format",
"description": "New log format beginning with MongoDB 4.4",
"url": "https://docs.mongodb.com/manual/reference/log-messages/index.html#structured-logging",
"json": true,
"file-pattern": ".*mongo.*",
"line-format": [
{ "field": "__timestamp__" },
" ",
<?php
/*
Plugin Name: WordPress MU Domain Mapping
Plugin URI: http://ocaoimh.ie/wordpress-mu-domain-mapping/
Description: Map any blog on a WordPress website to another domain.
Version: 0.5.4.3
Author: Donncha O Caoimh
Author URI: http://ocaoimh.ie/
*/
/* Copyright Donncha O Caoimh (http://ocaoimh.ie/)

Keybase proof

I hereby claim:

  • I am ilanco on github.
  • I am ilanco (https://keybase.io/ilanco) on keybase.
  • I have a public key whose fingerprint is 1097 2FFE 8BEF 9407 3909 CE46 1667 5C29 F8D3 27BC

To claim this, I am signing this object:

@ilanco
ilanco / backbone.collectioncache.js
Last active December 14, 2015 15:28 — forked from tbranyen/backbone.collectioncache.js
Correctly cache URLs with parameters.
/*!
* backbone.collectioncache.js v0.0.2
* Copyright 2012, Tim Branyen (@tbranyen)
* backbone.collectioncache.js may be freely distributed under the MIT license.
*/
(function(window) {
"use strict";
// Dependencies