Skip to content

Instantly share code, notes, and snippets.

View Mativve's full-sized avatar
⌨️
Coding is my life.

Mateusz Świder Mativve

⌨️
Coding is my life.
  • Poland
  • 01:17 (UTC +02:00)
View GitHub Profile
@Mativve
Mativve / scrimGradientOpacity.scss
Created January 17, 2024 15:02
Scrim Gradient with opacity
@mixin scrimGradient($startColor: $color-black, $direction: 'to bottom') {
$scrimCoordinates: (0: 1,
19: 0.738,
34: 0.541,
47: 0.382,
56.5: 0.278,
65: 0.194,
73: 0.126,
80.2: 0.075,
@Mativve
Mativve / style.scss
Created February 14, 2023 22:46
WordPress widgets style - SCSS
.widget{
// Links widget
&_links{
ul{
}
li{
@idleberg
idleberg / vscode-macos-context-menu.md
Last active September 22, 2024 17:45
“Open in Visual Studio Code” in macOS context-menu

Open in Visual Studio Code

  • Open Automator
  • Create a new document
  • Select Quick Action
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
    • your default shell should already be selected, otherwise use /bin/zsh for macOS 10.15 (”Catalina”) or later
    • older versions of macOS use /bin/bash
  • if you're using something else, you probably know what to do 😉
<!DOCTYPE html>
<html>
<head>
<title>Google Fonts Preview</title>
<style>
#preview {
margin: 0 auto;
text-align: center;
width: 80%;
}
@sajdoko
sajdoko / Theme_Customization_API.php
Created June 26, 2018 15:46
Wordpress Customizer API Sanitization Examples
<?php
///////////////////////////////
// HOW TO SANITIZE RADIO BOX //
///////////////////////////////
function theme_slug_customizer($wp_customize) {
//your section
$wp_customize->add_section(
'theme_slug_customizer_your_section',
array(
'title' => esc_html__('Your Section', 'theme_slug'),
@pabloleonalcaide
pabloleonalcaide / checkImageExist.js
Created May 17, 2018 08:08
Check if a image file exists with Javascript
/**
* Checking if an image exist in your image folder
*/
let loadImage = function(variable){
var image = new Image();
var url_image = './ImageFolder/' + variable + '.jpg';
image.src = url_image;
if (image.width == 0) {
return `<img src='./ImageFolder/defaultImage.jpg'>`;
} else {
@joseluisq
joseluisq / currencies.json
Created April 3, 2018 08:39
JSON list of all currency symbols available from the Open Exchange Rates API - https://docs.openexchangerates.org/docs/currencies-json
{
"AED": "United Arab Emirates Dirham",
"AFN": "Afghan Afghani",
"ALL": "Albanian Lek",
"AMD": "Armenian Dram",
"ANG": "Netherlands Antillean Guilder",
"AOA": "Angolan Kwanza",
"ARS": "Argentine Peso",
"AUD": "Australian Dollar",
"AWG": "Aruban Florin",
@kharakhordindemo
kharakhordindemo / form.php
Created December 22, 2017 15:21
Remove span in Contact Form 7
/*Contact form 7 remove span*/
add_filter('wpcf7_form_elements', function($content) {
$content = preg_replace('/<(span).*?class="\s*(?:.*\s)?wpcf7-form-control-wrap(?:\s[^"]+)?\s*"[^\>]*>(.*)<\/\1>/i', '\2', $content);
$content = str_replace('<br />', '', $content);
return $content;
});
@derekchiang
derekchiang / app.html
Last active August 13, 2024 08:01 — forked from bellbind/app.html
[electron]Use electron as a Web Server
<!doctype html>
<html><head><script src="app.js"></script></head><body></body></html>
@emilio-martinez
emilio-martinez / base64-as-texture-threejs.js
Created November 20, 2017 08:57
Base64 Image Data as Texture in ThreeJS
// Create an image
const image = new Image(); // or document.createElement('img' );
// Create texture
var texture = new THREE.Texture(image);
// On image load, update texture
image.onload = () => { texture.needsUpdate = true };
// Set image source
image.src = 'data:image/png;base64,XXXXX';