Skip to content

Instantly share code, notes, and snippets.

View AdsonCicilioti's full-sized avatar
🎯
Focusing on JS World

Adson Cicilioti AdsonCicilioti

🎯
Focusing on JS World
  • Brazil
View GitHub Profile
@felinto-dev
felinto-dev / storage.module.ts
Last active August 8, 2022 14:19
After a lot of headaches with plugins that propose to be a wrapper between nestjs and aws-sdk, I decided to configure the dependency injection by myself and the result was not bad. You can use this code as the basis for any cloud storage S3-compatible. I am using @nestjs/config to manage the settings of environment variables. For additional inst…
import { S3 } from 'aws-sdk';
import { Module } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { scalewayConfig } from '@/app/config/scaleway.config';
import { StorageService } from './services/storage.service';
@Module({
imports: [ConfigModule.forFeature(scalewayConfig)],
providers: [
@sjozsef
sjozsef / Pure Bootstrap Contact Form 7 template
Last active March 23, 2023 10:03
bootstrap-contact-form-7.html
<hr />
<div class="row">
<div class="col-md-4">
[text* your-name class:form-control placeholder "Name (required)"]
</div>
<div class="col-md-4">
[email* your-email class:form-control placeholder "Email (required)"]
add_filter( 'wc_order_is_editable', 'wc_make_processing_orders_editable', 10, 2 );
function wc_make_processing_orders_editable( $is_editable, $order ) {
if ( $order->get_status() == 'processing' ) {
$is_editable = true;
}
return $is_editable;
}
@trslater
trslater / custom-registration.php
Last active May 12, 2020 13:47
Custom Registration Plugin
<?php
/*
Plugin Name: Custom Registration
Description: Updates user rating based on number of posts.
Version: 1.1
Author: Tristan Slater w/ Agbonghama Collins
Author URI: http://kanso.ca
*/
@ahmadawais
ahmadawais / page-login.php
Last active July 20, 2019 09:18
WordPress Frontend Login Page [UPDATED]
<?php
/**
* Template Name: Login Page AA
*
* Login Page Template.
*
* @author Ahmad Awais
* @since 1.0.0
*/
@jwebcat
jwebcat / auto-coupon-woo.php
Created January 24, 2014 08:20
Automatically apply coupon to cart WooCommerce
add_action( 'woocommerce_before_cart', 'apply_matched_coupons' );
function apply_matched_coupons() {
global $woocommerce;
$get1 = 'getonech'; // your coupon code here
$get2 = 'gettwoch'; // your coupon code here
$get3 = 'getthreech'; // your coupon code here
$get4 = 'getfourch'; // your coupon code here
$get5 = 'getfivech'; // your coupon code here