Skip to content

Instantly share code, notes, and snippets.

View ca-santos's full-sized avatar

Caue Santos ca-santos

View GitHub Profile
@Konijima
Konijima / Project Zomboid - How to mod like a boss.md
Last active January 8, 2024 03:28
Project Zomboid - How to mod like a boss

How to mod like a boss 😎

This tutorial I will show you

  • how file load order works
  • how to think and structure lua mods
  • how to modify vanilla behaviour
  • how to use require with passion
  • and more...

@courtneymyers
courtneymyers / acf_modifications.php
Created February 28, 2018 18:36
Reduces initial height of Advanced Custom Fields WYSIWYG fields to 100px, and enables autoresizing of WYSIWYG field, as text is entered. Best practice would be to include this function in a site-specific plugin.
<?php
/*
* -----------------------------------------------------------------------------
* Advanced Custom Fields Modifications
* -----------------------------------------------------------------------------
*/
function PREFIX_apply_acf_modifications() {
?>
<style>
$(".data").mask("AB/CD/0000", {
translation:{
A: {pattern: /[0-3]/},
B: {pattern: /[0-9]/},
C: {pattern: /[0-1]/},
D: {pattern: /[0-9]/},
},
onKeyPress: function(a, b, c, d) {
if (!a) return;
var m = a.match(/(\d{2})/g);