Skip to content

Instantly share code, notes, and snippets.

@shmup
shmup / torrents.md
Last active June 15, 2024 20:01
transmission blocklist guide

Transmission Blocklist

The Transmission torrent client has an option to set a Blocklist, which helps protect you from getting caught and having the DMCA send a letter/email.

It's as simple as downloading and installing the latest client:

@evantoli
evantoli / GitConfigHttpProxy.md
Last active June 18, 2024 09:46
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@dazld
dazld / component.txt
Last active June 20, 2021 16:37
AEM Sightly JS globals, currentPage investigations
accessible
adaptTo
analyzable
cellName
childEditConfig
class
componentGroup
container
declaredChildEditConfig
declaredEditConfig
@tegansnyder
tegansnyder / disable mcafee endpoint protection.md
Last active December 26, 2023 03:18
Disable McAffee Endpoint Protection OSX

method 1

sudo /usr/local/McAfee/AntiMalware/VSControl stopoas

alternatively

sudo defaults write /Library/Preferences/com.mcafee.ssm.antimalware.plist OAS_Enable -bool False
sudo /usr/local/McAfee/AntiMalware/VSControl stop
sudo /usr/local/McAfee/AntiMalware/VSControl reload
@gabrielwalt
gabrielwalt / logic.js
Last active October 1, 2020 12:20
Output JSON into markup with Sightly
use(function () {
var myObj = {
foo: "bar",
arr: [1,2,3,4,5,6,7,8,9,10]
};
return {
json: JSON.stringify(myObj)
};
});
@nateyolles
nateyolles / curlPackageFilterRules.sh
Last active November 2, 2023 16:30
AEM/CQ cURL: Adding include/exclude rules to package filters
# Adding include/exclude rules to CQ/AEM package filters through cURL.
# Through a simple search, you will find numerous lists of CQ/AEM cURL commands.
# However, I haven't seen an example of adding rules to package filters. The
# JSON "rules" key takes an array value. You can leave the array empty if you
# don't need to include any rules. The array is of JSON objects with a
# "modifier" key and value of "include" or "exclude", and a "pattern" key with
# your path or regular expression as the value.
# create package
@floriankraft
floriankraft / JcrQueryLibrary.md
Last active May 3, 2024 05:50
Some useful JCR queries (XPATH, SQL2) for AEM/CQ development.

SQL2

All nodes with a specific name

SELECT * FROM [nt:unstructured] AS node
WHERE ISDESCENDANTNODE(node, "/search/in/path")
AND NAME() = "nodeName"

All pages below content path

@hlung
hlung / How to connect PS3 controller to a Mac or PC.md
Last active May 13, 2024 03:39
How to connect PS3 controller to a Mac or PC

How to connect PS3 controller to a Mac or PC

This is how you connect PS3 controller to Mac OSX, PC, etc. when previously connected to a PS3. You will need a Mini USB cable. Overcome your laziness, get up of your chair, and go get one!

A big misconception is that keep holding PS button will reset the controller's pairing. It DOES NOT! From my testings, the controller keeps paring with the last machine it was CONNECTED VIA A USB CABLE.

Here are the steps:

@danriti
danriti / hipchat-v2.sh
Last active July 19, 2021 10:49
HipChat API v2 - Send a message to a room using cURL
#!/bin/bash
# Set the ROOM_ID & AUTH_TOKEN variables below.
# Further instructions at https://www.hipchat.com/docs/apiv2/auth
ROOM_ID=XXX
AUTH_TOKEN=XXX
MESSAGE="Hello world!"
curl -H "Content-Type: application/json" \
@MarcDiethelm
MarcDiethelm / terrific-js-pattern.md
Last active May 23, 2016 08:08
Ein sauberes Pattern für Terrific JS Module

Ein sauberes Pattern für Terrific JS Module

Terrific.js ist ein grossartiges Tool um Frontend Code zu strukturieren und füllt damit eine der grossen Lücken die jQuery offen lässt. Weil Terrific auf jQuery basiert und aufbaut übernimmt es auch eine der Eigenschaften von jQuery. Eine Eigenschaft, die robuste und lesbare objektorientierte Programmierung erschwert.

Das Problem

jQuery verwendet die Konvention, dass in den meisten Callbacks, Event Handlers zum Beispiel, der Kontext this ein DOM-Objekt ist. Das führt zur unangenehmen Situation dass in einem Terrific Modul die Bedeutung von this ständig wechseln kann:

on: function(callback) {