Skip to content

Instantly share code, notes, and snippets.

View jacksonfdam's full-sized avatar
💻
Coding...

Jackson F. de A. Mafra jacksonfdam

💻
Coding...
View GitHub Profile
@ardakazanci
ardakazanci / rippleglass.kt
Last active March 8, 2026 15:18
LiquidGlassAGSLShader
private const val LiquidGlassShaderSource = """
const float PI = 3.1415926;
const float FORCE = 0.08;
const float THICKNESS = 0.075;
const float FEATHERING = 0.1;
const float ABERRATION_OFFSET = 0.006;
const float FLASH_INTENSITY = 3.0;
const float REFRACTION_STRENGTH = 0.03;
/*
* Copyright 2026 Georgiopoulos Kyriakos
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright 2026 Kyriakos Georgiopoulos
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
import androidx.compose.animation.core.*
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.material.Text
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.geometry.Size
@igorcosta
igorcosta / cpf_cnpj_validator
Created June 26, 2014 19:13
Regex para validar CPF e CNPJ
Para CPF
/^\d{3}\.\d{3}\.\d{3}\-\d{2}$/
Para CNPJ
/^\d{2}\.\d{3}\.\d{3}\/\d{4}\-\d{2}$/
Para ambos ao mesmo tempo
@claudiosanches
claudiosanches / script.js
Created August 30, 2013 20:30
WordPress - Video Shortcode responsive
jQuery(document).ready(function($) {
// Responsive wp_video_shortcode().
$(".wp-video-shortcode")
.css("max-width", "100%")
.parent("div")
.css("width", "auto");
});
@KevinGaudin
KevinGaudin / report.php
Last active October 17, 2021 07:00
Simplest PHP ACRA backend
<?php
// Outputs all POST parameters to a text file. The file name is the date_time of the report reception
$fileName = date('Y-m-d_H-i-s').'.txt';
$file = fopen($fileName,'w') or die('Could not create report file: ' . $fileName);
foreach($_POST as $key => $value) {
$reportLine = $key." = ".$value."\n";
fwrite($file, $reportLine) or die ('Could not write to report file ' . $reportLine);
}
fclose($file);
?>
@TCotton
TCotton / wordpress_category_redirect.php
Created March 5, 2013 06:43
A quick way to add a URL redirect feature to Wordpress categories
<?php namespace content;
/**
* Category_Add_Field
*
* redirect() method is called in the header.php file
* if the user specifies an external URL in the category field
*
* @package class for creating dynamic Wordpress metaboxes
* @author Andy Walpole
* @copyright A Walpole
@TCotton
TCotton / Content_Type_Jobs_Template.php
Last active December 13, 2015 19:58
Creating a PHP class to create Wordpress custom post types with dynamic metaboxes
<?php namespace content;
/**
* See blog post for details: http://www.suburban-glory.com/blog?page=174
*
* Content_Type
*
* @package class for creating dynamic Wordpress metaboxes
* @author Andy Walpole
* @copyright AWalpole
* @version 2013
@TCotton
TCotton / wordpress-breadcrumb-advanced.php
Last active November 20, 2017 17:37
Code for creating Wordpress breadcrumbs in a theme including custom taxonomy
<?php
// --> http://www.suburban-glory.com/blog?page=170
/*
* based on http://snipplr.com/view/57988/
*/
function get_term_parents($id, $taxonomy, $link = false, $separator = '/', $nicename = false, $visited = array()) {
$chain = '';
$parent = &get_term($id, $taxonomy);