Skip to content

Instantly share code, notes, and snippets.

View drblue's full-sized avatar
🔥
All Your Memes Are Belong To Me

Johan Nordström drblue

🔥
All Your Memes Are Belong To Me
View GitHub Profile
@drblue
drblue / class-s2-core.php.patch
Created September 4, 2014 11:41
Wordpress subscribe2 plugin digest template patch
Index: classes/class-s2-core.php
===================================================================
--- classes/class-s2-core.php (revision 979098)
+++ classes/class-s2-core.php (working copy)
@@ -1365,7 +1365,8 @@
}
} else {
// we are sending a preview
- $posts = get_posts('numberposts=1');
+ $posts = get_posts('numberposts=3');
@drblue
drblue / functions.php
Last active February 21, 2021 23:05
Wordpress subscribe2 plugin digest template modification
<?php
/*
*
* fix s2 plugin to have template support
*
*/
// enable repeatable templating
function llab_s2_filter($mailtext, $post_ids = null) {
@drblue
drblue / gist:a953016c80c25f8d3fc4
Created November 6, 2014 21:58
Grab (multiple) Android screenshots to computer via ADB
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen-$(date +%Y%m%d%H%M%S).png
@drblue
drblue / designer.html
Created January 4, 2015 13:53
designer
<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-app.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@drblue
drblue / .gitignore
Last active March 3, 2021 10:31 — forked from salcode/.gitignore
.gitignore for (local) Wordpress theme development
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
# Originaly from http://ironco.de/bare-minimum-git/
# ver 20150130
#
# This file is tailored for a WordPress project
# using the default directory structure
#
# This file specifies intentionally untracked files to ignore
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
<script src="http://www.parsecdn.com/js/parse-1.2.12.min.js"></script>
<meta charset=utf-8 />
<title>Example</title>
</head>
<body ng-app="AuthApp">
<div ng-hide="currentUser">
@drblue
drblue / fix_onedrive.sh
Last active April 16, 2024 21:54
Fix OneDrive for Mac CPU usage
#!/bin/bash
## Fix OneDrive for Mac CPU usage
##
## Seems this is still a problem 5 years later after I created this little gist.
## I have long since stopped using OneDrive (luckily), but according to
## comments below, I have added the new path for OfficeFileCache for macOS
## Mojave (10.14) and Catalina (10.15).
## Run this on macOS Mojave (10.14) and Catalina (10.15)
find ~/Library/Containers/ -type d -name OfficeFileCache -exec rm -r {} +
@drblue
drblue / EU_countries.txt
Last active March 4, 2023 11:57
Countries that are members of the European Union (as of 2023). Extracted 20230304 from [http://en.wikipedia.org/wiki/Member_state_of_the_European_Union]
Austria
Belgium
Bulgaria
Croatia
Cyprus
Czech Republic
Denmark
Estonia
Finland
France
{
"_id" : ObjectId("55dade63d6fdae8115f3e7ae"),
"title" : "Kompassen",
"properties" : {
"eventColor" : "#f44336",
"seats" : 20,
"equipment" : {
"largescreen" : true,
"projector" : false,
"whiteboard" : true
@drblue
drblue / header.php
Created March 15, 2017 14:50
Wordpress nav-walker for Bootstrap 4.0.0-alpha.6
<nav class="navbar navbar-toggleable-md navbar-inverse bg-inverse">
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="#"><?php bloginfo('name'); ?></a>
<?php
wp_nav_menu( array(
'theme_location' => 'header-menu',
'container' => 'div',
'container_class' => 'collapse navbar-collapse',