Skip to content

Instantly share code, notes, and snippets.

View SyntaxCacao's full-sized avatar

Charles Müller SyntaxCacao

  • Berlin, Germany
View GitHub Profile
@SyntaxCacao
SyntaxCacao / Common.js
Created January 26, 2024 18:40
MediaWiki TOC and headline numbering in "I. 1. a) α) αα)" format
/* Based on https://www.mediawiki.org/wiki/Snippets/Auto-number_headings */
const upperRoman = ["I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII", "XIII", "XIV", "XV", "XVI", "XVII", "XVIII", "XIX", "XX", "XXI", "XXII", "XXIII", "XXIV", "XXV"];
const lowerGreek = ["α", "β", "γ", "δ", "ε", "ζ", "η", "θ", "ι", "κ", "λ", "μ", "ν", "ξ", "ο", "π", "ρ", "ς", "τ", "υ", "φ", "χ", "ψ", "ω"];
const lowerLatin = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"];
var level2 = 0;
var level3 = 0;
var level4 = 0;
var level5 = 0;
@SyntaxCacao
SyntaxCacao / .editorconfig
Created June 2, 2018 18:46
Common .editorconfig setup
# editorconfig.org
root = true
[*]
charset = utf-8
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
@SyntaxCacao
SyntaxCacao / formatter.xml
Last active May 6, 2017 19:20
Personal eclipse code formatter settings for Java
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="12">
<profile kind="CodeFormatterProfile" name="SkeletonEye" version="12">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
@SyntaxCacao
SyntaxCacao / build.bat
Last active July 7, 2016 19:43
Compiles Java source code and puts it into a jar file.
@echo off
if not exist src (
echo Missing 'src\' folder. Creating one for you.
echo.
mkdir src
@echo Main-Class: MyPackage.MyClass> src\Manifest.txt
pause
exit /b
)
@SyntaxCacao
SyntaxCacao / .gitignore
Last active March 13, 2016 13:51 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Editor generated files #