Skip to content

Instantly share code, notes, and snippets.

View judytuna's full-sized avatar
💜
volunteer at Techtonica! https://techtonica.org/volunteer/

Judy Tuan judytuna

💜
volunteer at Techtonica! https://techtonica.org/volunteer/
View GitHub Profile
@onetarek
onetarek / class-custom-wc-webhook-mangager
Last active October 30, 2024 23:31
Add new WooComerce Webhook topic only for order completed
<?php
/*
Custom WC Webhook Manager
Add new webhook topic only for WC order completed.
Developed by Md Jahidul Islam ( oneTarek ) https://onetarek.com
*/
//Don't allow direct access
if( ! defined( 'ABSPATH' ) ) exit;
@jessepearson
jessepearson / adding_new_webhook_topics.php
Last active October 30, 2024 23:31
How to add a new custom Webhook topic in WooCommerce, with example of order filtering.
<?php // do not copy this line
/**
* add_new_topic_hooks will add a new webhook topic hook.
* @param array $topic_hooks Esxisting topic hooks.
*/
function add_new_topic_hooks( $topic_hooks ) {
// Array that has the topic as resource.event with arrays of actions that call that topic.
@BalzGuenat
BalzGuenat / terraria_tutorial.md
Last active February 5, 2024 03:24
Installing and running a Terraria server with tShock on a Raspberry Pi

Installing and running a Terraria server with tShock on a Raspberry Pi

This was originally posted here on reddit. If you decide to try this, please post a comment either confirming that it works or stating any issues that came up. Thanks to reddit user /u/mat_storm1 for pointing out some typos and thanks to reddit user /u/supercore23 for pointing out potential issues with spaces in the world path.

What is this?

This guide explains how to install and run a Terraria server on your Raspberry Pi. I assume you have already installed Raspbian and have a very basic understanding of the command line. Installation on other Unix-based systems should be very similar. The goal is to reach a setup that only requires you to plug in your Pi to start the server. Connecting to the server should be easily done by using a hostname, not an IP. We should also be able to ssh into the server and do server-admin stuff at any t

@joseluisq
joseluisq / terminal-git-branch-name.md
Last active November 4, 2024 04:14
Add Git Branch Name to Terminal Prompt (Linux/Mac)

Add Git Branch Name to Terminal Prompt (Linux/Mac)

image

Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
@ChandraNalaani
ChandraNalaani / republibot.rake
Created September 12, 2012 19:37
RepubliBot (ruby)
require 'twitter'
namespace :republibot do
desc "Tweet something ridiculous"
task :tweet do
Twitter.configure do |config|
config.consumer_key = '-----'
config.consumer_secret = '-----'
config.oauth_token = '-----'