Skip to content

Instantly share code, notes, and snippets.

View karneaud's full-sized avatar
💵
Looking for work

Kendall Arneaud karneaud

💵
Looking for work
View GitHub Profile
@onetarek
onetarek / class-custom-wc-webhook-mangager
Last active June 13, 2024 20:38
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;
@einichi
einichi / getIP.gs
Created December 25, 2019 07:50
Get IP Address of Hostname - Google App Script
function getIP(host, recordType) {
// Specify record type as per described here: https://en.wikipedia.org/wiki/List_of_DNS_record_types
// For example, 'A', 'AAAA', 'NS', etc...
// So your Google Sheets formula would be =getIP("www.example.com", "A")
var url = "https://dns.google.com/resolve?name=" + host + "&type=" + recordType;
var json = UrlFetchApp.fetch(url);
var response = JSON.parse(json);
var answer = response.Answer;
var ip = "";
if (typeof answer != "undefined") {
@bmoren
bmoren / fence.js
Created July 1, 2015 21:55
HTML5 geolocation geofence location detection (without geofence API)
window.onload = function() {
var startPos;
var startPosLat;
var startPosLong;
var distance;
if (navigator.geolocation) {
startPosLat = 44.95716993150707;
startPosLong = -93.28439280496818;
@benlk
benlk / 0-toc.md
Last active July 29, 2024 21:58
Collection of notes on WP_UnitTestCase
  1. Table of contents
  2. General information
    1. Terms
    2. General structure of a test
    3. WordPress-specific assertions and test functions
      • enqueues
      • creating posts
      • creating terms
      • attaching images
  • ?
@Fintan
Fintan / animation.scss
Created January 28, 2014 13:57
useful mixins showing how to create CSS animations using SASS. Some code wasn't taken from Bourbon library
@mixin keyframes($animation-name) {
@-webkit-keyframes $animation-name {
@content;
}
@-moz-keyframes $animation-name {
@content;
}
@-ms-keyframes $animation-name {
@content;
}