Skip to content

Instantly share code, notes, and snippets.

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

Daniel Aguilar dacmail

🏠
Working from home
View GitHub Profile
@dacmail
dacmail / composer.json
Created March 6, 2023 09:07
WP starter theme based on sage 9 updated to work with php 8.2
{
"name": "roots/sage",
"type": "wordpress-theme",
"license": "MIT",
"description": "WordPress starter theme with a modern development workflow",
"homepage": "https://roots.io/sage/",
"authors": [
{
"name": "Ben Word",
"email": "ben@benword.com",
@dacmail
dacmail / gist:26d48efb2da012d581c5464c47a4590d
Created March 4, 2023 11:29
Samsung 4K TV QLED Q8 series (Hex IR codes for universal controls or homebridge).
"volumeUp": "2600a000929511101110120f1f1212300f3311100e130e34103112300f33111011100f120f1212920f12120f0f12101211300f3311310e1311300f331130130f0f1211100f121032130e130e0f130d341000071c9494120f0f1211100e1311311031120f140d0f33113111311230101110110e1310120d9610110e131110130e0f321230142e0f121230132f0f330e131011140d1211122e140d0f12120f0f3310000d050000000000000000",
"volumeDown": "2600f40094931110111012101219142e10321011120f132e142e11311131111011101111120e1391111011101011120f130e10111010113111311230132f140d132f103210321110120e130e140d142e140004ef0a00021f9890140d101111101011122f142e140d140d142e113111311032120f130e10101110119311101210120e140d140d140d160d142e103210321130130e132f142e142e140d140d10111011132f130007199790111011101110111011311230130e101110321130132f132f140d140d140d140d1094111011101210120e130e10111011132f132e142e1131111011311131132f130e101110101210122f13000d0500000000"
"select": "26008c009294123814341435121311131113121312121235133f15351412131114101410141012121113121312361410143415341411143414361435141014341510
@dacmail
dacmail / get_block_data.php
Last active April 21, 2022 14:13
Get ACF field value from Gutenberg Block
function get_block_data($post, $block_name = 'core/heading', $field_name = "" ){
$content = "";
if ( has_blocks( $post->post_content ) && !empty($field_name )) {
$blocks = parse_blocks( $post->post_content );
foreach($blocks as $block){
if ( $block['blockName'] === $block_name ) {
if(isset($block["attrs"]["data"][$field_name ])){
$content = $block["attrs"]["data"][$field_name ];
}
}
@extends('layouts.app')
@section('content')
<section class="c-content">
<div class="c-content__wrapper">
<header class="c-content__header">
@php
do_action( 'sensei_single_course_content_inside_before', get_the_ID() );
@endphp
</header>
<?php
namespace App;
if (defined('ABSPATH')) {
add_action('after_setup_theme', function () {
add_theme_support('sensei');
});
/**
* @param string $template
@dacmail
dacmail / gist:db6d0aa43f58ebda6656
Created October 23, 2015 07:14
Unable to connect to indexer
System.Net.CookieException: An error occurred when parsing the Cookie header for Uri 'https://torrentapi.org/pubapi_v2.php?get_token=get_token'. ---> System.Net.CookieException: Cookie format error.
at System.Net.CookieContainer.CookieCutter (System.Uri uri, System.String headerName, System.String setCookieHeader, Boolean isThrow) [0x0009c] in /private/tmp/source-mono-mac-4.0.0-bug-33585-hotfix/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/external/referencesource/System/net/System/Net/cookiecontainer.cs:610
--- End of inner exception stack trace ---
at System.Net.CookieContainer.CookieCutter (System.Uri uri, System.String headerName, System.String setCookieHeader, Boolean isThrow) [0x00111] in /private/tmp/source-mono-mac-4.0.0-bug-33585-hotfix/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/external/referencesource/System/net/System/Net/cookiecontainer.cs:633
at System.Net.CookieContainer.SetCookies (System.Uri uri, System.String cookieHead