Skip to content

Instantly share code, notes, and snippets.

View akkis's full-sized avatar
🧩
Working from home

Akis Laoutaris akkis

🧩
Working from home
View GitHub Profile
@indyone
indyone / EduPass.csproj
Last active February 4, 2022 07:47
EduPass Generator for Lame Fathers (and Mothers)
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>10</LangVersion>
</PropertyGroup>
@nkarpeev
nkarpeev / gist:5fb28d13e0aa02494d1464ecea374fd1
Created December 11, 2018 14:35
Using the_posts_pagination for custom page template WordPress
// Define page_id
$page_ID = get_the_ID();
// Define paginated posts
$page = get_query_var( 'page' );
// Define custom query parameters
$args = array(
'post_type' => array( 'post', 'book', 'movie' ), // post types
'posts_per_page' => 5,
As i had a hard time finding anything in the mailchimp documentation, i thought it might help a lost soul to put this info here:
If you cannot find your marketing_permission_id of your mailchimp list (eg. for GDPR compliance), you can do a signup request (maybe others too),
using the API, and it will return its data, including the marketing_permissions array containing the unique id for the opt-in.
POST:
{
"email_address": "xxx@xxx.xx",
"status": "subscribed",
"status_if_new": "subscribed",
"merge_fields": {
"FNAME": "John",
@jpmens
jpmens / tim-books-two.txt
Created May 26, 2018 20:09
Tim booked two
A priest and a shepherd from Australia participate in a TV game. After answering all the questions, there is a tie.
So both are given one final assignment. It is to write a poem in three minutes, using the word "Timbuktu".
It is a city in Africa.
The priest returns with the fruit of his inspiration:
"I was a father all my life,
I had no children, had no wife,
I read the bible through and through
on my way to Timbuktu ... "
@noelboss
noelboss / git-deployment.md
Last active May 16, 2024 20:41
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@Nilpo
Nilpo / Using Git to Manage a Live Web Site.md
Last active April 26, 2024 19:09
Using Git to Manage a Live Web Site

Using Git to Manage a Live Web Site

Overview

As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.

Contents

@Clorith
Clorith / functions.php
Last active April 9, 2024 01:35
WordPress filter for adding responsive wrapper to embedded content
<?php
/**
* Filter for adding wrappers around embedded objects
*/
function responsive_embeds( $content ) {
$content = preg_replace( "/<object/Si", '<div class="embed-container"><object', $content );
$content = preg_replace( "/<\/object>/Si", '</object></div>', $content );
/**
* Added iframe filtering, iframes are bad.