Skip to content

Instantly share code, notes, and snippets.

@OrionReed
OrionReed / DOM3D.js
Last active March 28, 2024 10:59
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@dmattera
dmattera / launchctl_man_pages.md
Last active March 28, 2024 10:58
macOS man page entries for launchctl services

This list was auto-generated on macOS 10.15 (Catalina) using a script that did the following:

  1. grabbed the name of all the .plist files located in the 5 folders used by launchctl:
  • ~/Library/LaunchAgents Per-user agents provided by the user.
  • /Library/LaunchAgents Per-user agents provided by the administrator.
  • /Library/LaunchDaemons System wide daemons provided by the administrator.
  • /System/Library/LaunchAgents OS X Per-user agents.
  • /System/Library/LaunchDaemons OS X System wide daemons.
@sanxiyn
sanxiyn / lisp.c
Created August 14, 2010 04:16
Lisp
#include <assert.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
enum type {
NIL,
@campusboy87
campusboy87 / wpcf7_modal_invalid.php
Last active March 28, 2024 10:57
Displays a message about the successful submission of the form in a modal window for the Contact Form 7 plugin
<?php
/**
* Plugin Name: CF7 Modal Invalid Answer
* Plugin URI: https://gist.github.com/campusboy87/a056c288c99feee70058ed24cee805ad
* Author: Campusboy (wp-plus)
* Author URI: https://www.youtube.com/wp-plus
*/
add_action( 'wp_enqueue_scripts', 'wpcf7_modal_invalid_js' );
add_action( 'wp_footer', 'wpcf7_modal_invalid_js_inline', 999 );
@gwenzek
gwenzek / remote_subl.md
Last active March 28, 2024 10:56
Sublime Text for remote development

This steps should help working remotely with Sublime Text. They are meant to be incremental, just setting up SFTP will go a long way.

My workflow

I have all my code on my laptop, edit locally and automatically push the files to my server. I never edit "tracked" files on the server directly. I sometimes modify untracked files on the server using rmate (see below).

Git for Windowsにpacmanをインストールする

Git for Windowsの環境にMSYS2で使えるパッケージマネージャpacmanをインストールする。

  1. Git Bashを管理者権限で立ち上げる

  2. MSYS2のzstパッケージを解凍するためzstd.exeを/usr/local/binに配置

mkdir -p /usr/local/bin
curl -o /usr/local/bin/zstd.exe -L https://github.com/git-for-windows/git-sdk-64/blob/main/usr/bin/zstd.exe?raw=true
@asimzeeshan
asimzeeshan / install_vnc.sh
Created November 4, 2012 09:22
Install VNC w/ GNOME on Debian VPS
#!/bin/bash
# Install and configure VNC for Ubuntu Linux
#
# Tested on Ubuntu 12.04
# Tested on Virtualization type: OpenVZ, KVM
#
# Script by: Asim Zeeshan
# http://www.asim.pk/
#
# Original Posted by VPS6.NET (https://vps6.net)
@BLESSED-BO
BLESSED-BO / fd2.js
Created March 28, 2024 10:54 — forked from makki3525/fd2.js
const {
forwardOrBroadCast,
bot,
parsedJid,
getBuffer,
} = require('../lib/')
const url1 = 'https://i.imgur.com/V6JMEI4.jpeg'
const url2 = 'https://i.imgur.com/V6JMEI4.jpeg'
bot(
@makki3525
makki3525 / fd2.js
Last active March 28, 2024 10:54 — forked from tayyabali8677/fd2.js
const {
forwardOrBroadCast,
bot,
parsedJid,
getBuffer,
} = require('../lib/')
const url1 = 'https://i.imgur.com/V6JMEI4.jpeg'
const url2 = 'https://i.imgur.com/V6JMEI4.jpeg'
bot(