Style | Rule | Example | Reason |
---|---|---|---|
Indentation | 3 spaces (no tabs) | ... | |
Quotes (JS) | Single quote (' ) |
const code = 'j7'; |
... |
Quotes (HTML) | Double quote (" ) |
<meta name=robots content="index, follow"> |
... |
Trailing Comma | Yes on multi-line arrays and objects, no on inline | const edges = [747, 333, 2121]; |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* PERFECT PHP - centerkey.com/php - MIT or WTFPL (your choice) */ | |
/* PERFECT style */ | |
form.perfect { display: flex; flex-direction: column; max-width: 25em; background-color: whitesmoke; color: dimgray; border: 1px solid; border-radius: 2px; padding: 0px; margin: 0px auto 20px auto; } | |
form.perfect >* { margin: 0px 20px 20px 20px } | |
form.perfect h2 { font-size: 1.2rem; text-align: center; color: white; padding: 0.3em; margin: 0px 0px 20px 0px; } | |
form.perfect label { display: block; font-size: 1.0rem; text-align: left; margin-bottom: 20px; } | |
form.perfect input, form.perfect select, form.perfect textarea { width: 100%; max-width: 100%; font-size: 1.2rem; margin: 0px; } | |
form.perfect textarea { height: 4.1em; } | |
form.perfect input, form.perfect textarea { box-sizing: border-box; border: 1px solid silver; border-radius: 5px; padding: 0.3em; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############### | |
# Task Runner # | |
# WTFPL # | |
############### | |
# To make this file runnable: | |
# $ chmod +x *.sh.command | |
banner="Task Runner" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<!-- - - - - - - - --> | |
<!-- Website info --> | |
<!-- WTFPL --> | |
<!-- - - - - - - - --> | |
<html lang=en> | |
<head> | |
<meta charset=utf-8> | |
<meta name=viewport content="width=device-width, initial-scale=1"> | |
<meta name=robots content="index, follow"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################# | |
# Start MongoDB # | |
# WTFPL # | |
################# | |
# https://gist.github.com/dpilafian/b07722347bb296cb6f3b6c300869d256 | |
displayIntro() { | |
echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> | |
<!-- Folder Listing --> | |
<!-- v1.3.4 (June 27, 2024) --> | |
<!-- A good looking replacement for Directory Listings: --> | |
<!-- Rename this file to "index.php" and copy it into a web --> | |
<!-- server directory to enable browsing on that directory. --> | |
<!-- Requirement: --> | |
<!-- Apache HTTP Server Project with php_module enabled --> | |
<!-- (see: [PKG-INSTALL-HOME]/etc/httpd/httpd.conf) --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
##################################################### | |
# Unix/Linux Folder Tree v2.9 # | |
# # | |
# Displays structure of folder hierarchy # | |
# ------------------------------------------------- # | |
# This tiny script uses "ls", "grep", and "sed" # | |
# in a single command to show the nesting of # | |
# subfolders. # | |
# # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def toSalesforceId18(String id) { | |
// Converts a Salesforce id15 to id18. | |
// Example: | |
// assert toSalesforceId18("001C000000o4Ooi") == "001C000000o4OoiIAE" | |
// Details: | |
// https://blog.centerkey.com/2014/08/groovy-convert-salesforce-id15-id18.html | |
// MIT License (c) 2019 Pilafian | |
def valueToCode = { ((it < 26 ? "A" : "0") as char) + it % 26 } | |
def binaryToCode = { valueToCode(Integer.parseInt(it, 2)) as char } | |
def tripletToBinary = { it.reverse().replaceAll(/[^A-Z]/, "0").replaceAll(/[^0]/, "1") } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:::::::::::::::::: | |
:: npm Test All :: | |
:::::::::::::::::: | |
:: For those who don't develop on Windows but must still test on Windows... | |
:: Flags: | |
:: --nuke | |
:: Deletes each "node_modules" folders for fresh installs | |
:: --test |