Skip to content

Instantly share code, notes, and snippets.

@mmazzarolo
mmazzarolo / disable-people-also-search-for-google.md
Last active February 21, 2024 10:19
Disabling "People also search for" box in Google search results
@JBoss925
JBoss925 / commonOps.ts
Created February 18, 2020 09:17
A promise-based way to resolve firebase firestore references recursively in an object and asynchronously.
// This file contains common operations that will need to be performed often.
import { firestore } from "firebase";
import { isUndefined } from "util";
/**
* This function takes a collection reference and turns it into an array
* of its constituent document references
*
* @param coll the collection to convert into a docref array
@dakzilla
dakzilla / artifactory.sh
Last active January 24, 2024 15:47
Shell script to upload a Composer package to Artifactory from Gitlab CI and tag it with a version number
#!/usr/bin/env bash
set -e
# Variables
COMPOSER_NAME="$(cat composer.json | jq -r '.name')"
PROJECT_NAME="$(echo ${COMPOSER_NAME} | cut -d'/' -f 2)"
BUILD_NAME="${PROJECT_NAME}-${CI_COMMIT_TAG}.zip"
ARTIFACTORY_REPOSITORY="php"
ARTIFACTORY_PATH="${ARTIFACTORY_REPOSITORY}/${COMPOSER_NAME}"
SELECT
"Zettr\\Handler\\Magento\\CoreConfigData" AS handler,
scope AS param1,
scope_id AS param2,
path AS param3,
"" AS groups,
IFNULL(`value`, '') AS `default`,
'' AS devbox,
'' AS deploy,
'' AS latest,
@nacholibre
nacholibre / readme.md
Last active December 27, 2019 16:02
HOWTO: Install Adobe Photoshop CC on a Case-Sensitive System OSX/MacOS (El Capitan, Sierra)

##Requirements

  1. Xcode

    You can install it from AppStore.

  2. Command Line Tools for Xcode.

    You can install it from Xcode's Preferences -> Downloads.

@w00fz
w00fz / sphp.sh
Last active February 7, 2022 00:12
PHP switcher
#!/bin/bash
# Check if command was ran as root.
if [[ $(id -u) -eq 0 ]]; then
echo "The command \"sphp\" should not be executed as root or via sudo directly."
echo "When a service requires root access, you will be prompted for a password as needed."
exit 1
fi
# Usage
@cupracer
cupracer / varnishlog-examples.sh
Last active September 13, 2024 15:57
varnishlog examples (version 4.x)
# filter by request host header
varnishlog -q 'ReqHeader ~ "Host: example.com"'
# filter by request url
varnishlog -q 'ReqURL ~ "^/some/path/"'
# filter by client ip (behind reverse proxy)
varnishlog -q 'ReqHeader ~ "X-Real-IP: .*123.123.123.123"'
# filter by request host header and show request url and referrer header
@marcatos
marcatos / blur.css
Created March 16, 2016 14:50
class for a blurry effect
.blur {
-webkit-filter: blur(5px);
-moz-filter: blur(5px);
-o-filter: blur(5px);
filter: url('data:image/svg+xml;utf8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"><filter id="blur"><feGaussianBlur in="SourceGraphic" stdDeviation="5" /></filter></svg>#blur');
-moz-transition: all 300ms ease;
-o-transition: all 300ms ease;
-webkit-transition: all 300ms ease;
transition: all 300ms ease;
-webkit-transform: translateZ(0);
@nrollr
nrollr / ApacheHTTPSConfig.md
Last active November 13, 2024 10:41
Enable SSL in Apache for 'localhost' (OSX, El Capitan)

Enable SSL in Apache (OSX)

The following will guide you through the process of enabling SSL on a Apache webserver

  • The instructions have been verified with OSX El Capitan (10.11.2) running Apache 2.4.16
  • The instructions assume you already have a basic Apache configuration enabled on OSX, if this is not the case feel free to consult Gist: "Enable Apache HTTP server (OSX)"

Apache SSL Configuration

Create a directory within /etc/apache2/ using Terminal.app: sudo mkdir /etc/apache2/ssl
Next, generate two host keys:

@bordeo
bordeo / new_mac_web_developer.sh
Last active March 8, 2018 08:41
New Mac Web developer
#LAST EDIT 18/07/2017
#
# CHANGELOG
#
# * 18/07/2017 update docker images, port bind and mount dir
#
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"