Skip to content

Instantly share code, notes, and snippets.

View mattchilds1's full-sized avatar
👨‍💻

Matt Childs mattchilds1

👨‍💻
View GitHub Profile
@brsma
brsma / Obsidian recommended plugins
Last active August 5, 2024 17:05
A few Obsidian plugins I can wholeheartedly recommend
@bsmithrainbowshops
bsmithrainbowshops / google-to-shopify-taxonomy.js
Created February 20, 2023 15:23
Taxonomy category product mapping for google > shopify product taxonomies.
//Key is google taxonomy id, value is shopify collection id
//a partial mapping of the two taxonomies together.
//Google: https://www.google.com/basepages/producttype/taxonomy-with-ids.en-US.txt
//Shopify: https://help.shopify.com/txt/product_taxonomy/en.txt
const GOOGLE_TO_SHOPFIY_TAXONOMY = {
9: "3075",
100: "4074",
103: "4079",
104: "4080",
108: "4080",
@alexserver
alexserver / rest-basics.md
Created October 28, 2015 18:56
REST basics, Theory, Principles, and examples.

RESTful API know-how

Motivation

I place my learning process in this document with 2 motives:

  1. To have a quick guide whenever I lost the track of knowledge.
  2. To share the knowledge with anyone wants to learn RESTful APIs

1. Before, some theory

@rothgar
rothgar / main.yml
Last active April 28, 2025 04:18
Generate /etc/hosts with Ansible
# Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source.
# Will include all hosts the playbook is run on.
# Inspired from http://xmeblog.blogspot.com/2013/06/ansible-dynamicaly-update-etchosts.html
- name: "Build hosts file"
lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{item}}" state=present
when: hostvars[item].ansible_default_ipv4.address is defined
with_items: groups['all']
@lucasstark
lucasstark / gist:6594983
Created September 17, 2013 14:21
Example to add meta data to woocommerce cart items
<?php
/*
* Plugin Name: Example Modify Price
*/
class Example_Modify_Price {
private static $instance;
public static function register() {
if (self::$instance == null) {
@huyng
huyng / reflect.py
Created February 7, 2011 17:57
A simple echo server to inspect http web requests
#!/usr/bin/env python
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):