Skip to content

Instantly share code, notes, and snippets.

@nowakpiotrek
nowakpiotrek / scripts.js
Last active November 12, 2020 18:13
CF7 Multi-Step Addon Plugin (v1.0.0) fix for checkbox validation between steps
(function ( $ ) {
"use strict";
/*
* Plugin trx_mscf_ajax provides Contact Form 7 ajax behaviour
* */
$.fn.trx_mscf_ajax = function(options) {
$.fn.trx_mscf_ajax.options = $.extend( {}, $.fn.trx_mscf_ajax.defaults, options );
return this.each(function(index, container) {
@javier-menendez
javier-menendez / sqlite3_disable_referential_to_rails_5.rb
Last active July 11, 2024 22:33
Rails 5 initializer for disable foreign keys during `alter_table` for sqlite3 adapter
require 'active_record/connection_adapters/sqlite3_adapter'
#
# Monkey-patch for disable foreign keys during `alter_table` for sqlite3 adapter for Rails 5
#
module ActiveRecord
module ConnectionAdapters
class SQLite3Adapter < AbstractAdapter
@stormwild
stormwild / woocommerce-create-order.md
Last active October 28, 2024 06:17
WooCommerce Creating Order Programmatically

WooCommerce Creating Order Programmatically

WooCommerce Create Order

creating Woocommerce order with line_item programatically

// http://stackoverflow.com/questions/26581467/creating-woocommerce-order-with-line-item-programatically
$address = array(
            'first_name' => 'Fresher',
@mlanett
mlanett / rails http status codes
Last active February 3, 2025 11:36
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@bryanbarnard
bryanbarnard / SimpleHttpClient.cs
Created December 23, 2013 19:15
Simple C# .NET 4.5 HTTPClient Request Using Basic Auth and Proxy
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net.Http;
using System.Net;
namespace HTTP_Test