Skip to content

Instantly share code, notes, and snippets.

@krisanalfa
krisanalfa / KeyGenerateCommand.php
Last active September 25, 2023 17:25
Lumen Key Generator Commands
<?php
namespace App\Console\Commands;
use Illuminate\Support\Str;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
class KeyGenerateCommand extends Command
{
@joecampo
joecampo / Connecting PHP 5.6 to MSSQL.md
Last active June 4, 2022 14:20
Connecting PHP 5.6 to MSSQL - Ubuntu (Debian) w/ Apache
@Yimiprod
Yimiprod / difference.js
Last active August 7, 2025 14:25
Deep diff between two object, using lodash
/**
* This code is licensed under the terms of the MIT license
*
* Deep diff between two object, using lodash
* @param {Object} object Object compared
* @param {Object} base Object to compare with
* @return {Object} Return a new object who represent the diff
*/
function difference(object, base) {
function changes(object, base) {
@rponte
rponte / get-latest-tag-on-git.sh
Last active June 17, 2025 17:34
Getting latest tag on git repository
# The command finds the most recent tag that is reachable from a commit.
# If the tag points to the commit, then only the tag is shown.
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object
# and the abbreviated object name of the most recent commit.
git describe
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix:
git describe --abbrev=0
# other examples
@wesbos
wesbos / tab-trigger.js
Created November 16, 2015 19:33
How to properly get a TAB trigger working with Emmet inside of JSX
{
"keys": ["tab"],
"command": "expand_abbreviation_by_tab",
// put comma-separated syntax selectors for which
// you want to expandEmmet abbreviations into "operand" key
// instead of SCOPE_SELECTOR.
// Examples: source.js, text.html - source
"context": [
{
@joepie91
joepie91 / vpn.md
Last active August 13, 2025 17:41
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@vijayrami
vijayrami / How To disable Page Configuration tab in typo3 backend
Created December 3, 2015 12:40
How To disable Page Configuration tab in typo3 backend
Add Below Code in your Page Typoscript Configuration.
# For Not Displaying page Configuration tab
TCEFORM.pages.tx_fed_page_flexform {
# You cannot edit the Page Configuration field now:
disabled = 1
}
TCEFORM.pages.tx_fed_page_flexform_sub {
# You cannot edit the Page Page Configuration - subpages field now:
disabled = 1
@parmentf
parmentf / GitCommitEmoji.md
Last active August 13, 2025 20:30
Git Commit message Emoji

Inspired by dannyfritz/commit-message-emoji

See also gitmoji.

Commit type Emoji
Initial commit πŸŽ‰ :tada:
Version tag πŸ”– :bookmark:
New feature ✨ :sparkles:
Bugfix πŸ› :bug:
@fredbenenson
fredbenenson / kickstarter_sql_style_guide.md
Last active May 22, 2025 23:58
Kickstarter SQL Style Guide
layout title description tags
default
SQL Style Guide
A guide to writing clean, clear, and consistent SQL.
data
process

Purpose

@RyanABailey
RyanABailey / Item Resolver
Created April 11, 2016 07:50
Sitecore Custom Item Resolver
public class MyCustomResolver : HttpRequestProcessor
{
public override void Process(HttpRequestArgs args)
{
// Return if Sitecore has found the item
if (Context.Item != null || Context.Database == null || args.Url.ItemPath.Length == 0) return;
// If item not found
var itemPath = args.Url.ItemPath; // The requested item path