Skip to content

Instantly share code, notes, and snippets.

@plugn
plugn / nginx_macos.md
Created April 4, 2025 08:54 — forked from osamaqarem/nginx_macos.md
Nginx on MacOS

Install nginx (Homebrew)

brew install nginx

Configuration file for nginx will be at /usr/local/etc/nginx/nginx.conf

Web apps can be stored at /usr/local/var/www

Commands

Start:

@plugn
plugn / get-event-listeners.js
Created November 28, 2024 15:53 — forked from cmckni3/get-event-listeners.js
Get all event listeners on page
window.getAllEventListeners = () => {
return Array.from(document.querySelectorAll('*')).map(element => {
const listeners = getEventListeners(element);
return {
element: element,
listeners: Object.keys(listeners).map(key => {
return {
event: key,
@plugn
plugn / index.html
Last active November 14, 2024 09:58
JointJS+: PDF Export
<div id="app">
<div id="paper-container"></div>
</div>
<div id="toolbar-container"></div>
<a target="_blank" href="https://www.jointjs.com">
<img id="logo" src="https://assets.codepen.io/7589991/jointjs-logo.svg" width="200" height="50"></img>
</a>
@plugn
plugn / Search my gists.md
Created August 28, 2024 21:07 — forked from OrenBochman/Search my gists.md
How to search gists

Gist Search Cheatsheet

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:orenbochman

Find all gists with a .yml extension.
extension:yml

@plugn
plugn / index.html
Created July 10, 2024 16:55
Paste image from clipboard.
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
<p>Hit Cmd or Ctrl V with an image on your clipboard. Click on image and hit Backspace to remove.</p>
@plugn
plugn / download-from-facecast.md
Created June 10, 2024 09:59 — forked from cornerot/download-from-facecast.md
How download video from facecast.net
@plugn
plugn / index.html
Created February 29, 2024 16:19
JointJS: Shapes Drawing
<div id="paper-container"></div>
<div id="tools">
<input type="radio" name="tools" id="Pointer">
<label for="Pointer">Pointer</label>
<input type="radio" name="tools" id="Line">
<label for="Line">Line</label>
<input type="radio" name="tools" id="Rectangle" checked>
<label for="Rectangle">Rectangle</label>
<input type="radio" name="tools" id="Ellipse">
@plugn
plugn / jointjs-comment-mode.markdown
Last active February 14, 2024 09:19
JointJS: Comment Mode

JointJS: Comment Mode

Do you want to enable a special mode where users can only post comments? They could only insert or delete comments, but not interfere with the structure of the diagram. Take a look at this code pen.

A Pen by Max Dolgov on CodePen.

License.

@plugn
plugn / PreventGhostClick.js
Created January 17, 2024 21:55 — forked from jtangelder/PreventGhostClick.js
PreventGhostClick
/**
* Prevent click events after a touchend.
*
* Inspired/copy-paste from this article of Google by Ryan Fioravanti
* https://developers.google.com/mobile/articles/fast_buttons#ghost
*
* USAGE:
* Prevent the click event for an certain element
* ````
* PreventGhostClick(myElement);
@plugn
plugn / .block
Created January 9, 2024 17:00 — forked from mbostock/.block
Line Drawing
license: gpl-3.0
redirect: https://observablehq.com/@d3/draw-me