Skip to content

Instantly share code, notes, and snippets.

View wilrib's full-sized avatar
🏠
Working from home

William wilrib

🏠
Working from home
View GitHub Profile
@wilrib
wilrib / mytheme_shipping_plugin.php
Created March 9, 2023 16:42 — forked from MogulChris/mytheme_shipping_plugin.php
WooCommerce custom shipping method plugin
<?php
//I found a few tutorials for making custom WooCommerce shipping methods but most were confusing or didn't work any more.
//This is a simple custom shipping method.
//It originally calculated a fee per 'delivery day' based on some date meta on the cart items, but for this example it's a hard-coded flat fee.
//See calculate_shipping()
//Step 1:
//Save this code (minus these instructions) in a file in your plugins directory, preferably in its own subdirectory eg myplugin_shipping/myplugin_shipping.php
//Step 2:
@wilrib
wilrib / 00.md
Created December 16, 2022 15:35 — forked from maxivak/00.md
Sending emails with ActionMailer and Sidekiq

Sending emails with ActionMailer and Sidekiq

Send email asynchroniously using Sidekiq.

ActionMailer

Create your mailer us usual:

@wilrib
wilrib / domain-heroku.txt
Created September 16, 2022 21:26 — forked from estellegresillon/domain-heroku.txt
[HOSTING] Point your ovh domain to heroku
- Go to your heroku account > Select your app > Settings
- Go to the "Domains" section and click "Add domain"
- Enter your domain with www => "www.yourapp.com"
- Heroku will provide you a DNS to point to like this one strange-name-jl5klkslds2qm505.herokudns.com
- Copy this DNS
- Go to your ovh account > My Domains > DNS Zone
- Remove the DNS "www.yourapp.com. | 0 | CNAME yourapp.com."
- Remove the 3 TXT DNS entries
- Select "Add a DNS entry"
@wilrib
wilrib / reupload_vinted_items.py
Created February 10, 2022 15:35 — forked from theomart/reupload_vinted_items.py
Reupload items on vinted.fr to appear at the top of the listings
from playwright.async_api import async_playwright
import time
import re
import json
import urllib
import requests
from bs4 import BeautifulSoup
import logging
logger = logging.getLogger()
@wilrib
wilrib / README.md
Created November 20, 2019 08:43 — forked from bazzel/README.md
Rails 6 and Bootstrap 4

This blogpost shows how to setup Rails 6 with Bootstrap 4.

This snippet shows a somehow different and less customized approach.

$ rails new rails6-bootstrap4
$ bundle --binstubs
$ yarn add bootstrap jquery popper.js
@wilrib
wilrib / laravellocal.md
Created October 2, 2019 13:52 — forked from hootlex/laravellocal.md
Run laravel project locally

##Windows users:

cmder will be refered as console

##Mac Os, Ubuntu and windows users continue here:

  • Create a database locally named homestead utf8_general_ci