Skip to content

Instantly share code, notes, and snippets.

View bschulz87's full-sized avatar
๐Ÿ‰

Benjamin Schulz bschulz87

๐Ÿ‰
  • Germany, Berlin
View GitHub Profile
@bschulz87
bschulz87 / gist:358c47feb573838dec8b01b9f92ddf35
Created July 15, 2017 16:04
Wordpress Easy URL Search and Replace
UPDATE wp_options SET option_value = replace(option_value, 'http://old', 'http://new') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://old','http://new');
UPDATE wp_posts SET post_content = replace(post_content, 'http://old', 'http://new');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://old','http://new');
@bschulz87
bschulz87 / _id.vue
Last active November 17, 2021 18:45
Nuxt.js Static GraphQL Queries powered by Axios
<template>
<div v-if="Car">
<h3>{{ Car.make }} {{ Car.model }}</h3>
<img :src="Car.photoURL" :alt="`${Car.model} photo`">
<p><nuxt-link to="/">Home page</nuxt-link></p>
</div>
</template>
<script>
import staticData from '~/plugins/axios-ecstatic'
@bschulz87
bschulz87 / actions.js
Created May 23, 2018 13:56
Vuex API Example
import api from '@/api'
const getArticle = ({commit}) => {
return new Promise((resolve, reject) => {
api.getArticle().then((result) => {
if (result) {
commit('UPDATE_ARTICLE', result)
resolve('Successfully got article')
} else {
reject(Error('Could not get article'))
@bschulz87
bschulz87 / backup.sh
Last active May 26, 2018 20:46
Docker Volume Backup
#loomchild
docker run -v MYVOLUME:/volume -v /tmp:/backup loomchild/volume-backup \
backup MYVOLUME
#alpine
docker run -it -v MYVOLUME:/volume -v /tmp:/backup alpine \
tar -cjf /backup/MYVOLUME.tar.bz2 -C /volume ./
@bschulz87
bschulz87 / .env
Last active September 14, 2021 12:18
Pydio Cells Docker Compose
PYDIO_URL=my.pydio.cells
MYSQL_ROOT_PASSWORD=rootPassword
MYSQL_DATABASE=pydio
MYSQL_USER=cells
MYSQL_PASSWORD=password
@bschulz87
bschulz87 / Query.vue
Last active October 7, 2019 09:04
Squidex GraphQL Query
<template lang="pug">
div {{ api }}
</template>
<script>
import { queryCMS } from '@/api'
export default {
data: () => ({
api: null
}),
@bschulz87
bschulz87 / controls.php
Last active February 5, 2020 16:12
Elementor Custom Control
<?php
namespace ElementorControls;
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
class Elementor_Custom_Controls {
private static $_instance = null;
@bschulz87
bschulz87 / index.html
Created February 12, 2019 15:15
vue-matomo with external tracking client
<!DOCTYPE html>
<html lang="en">
<head>
<!-- ... --->
<script src="https://my.matomo.cloud/matomo.js"></script>
<!-- ... --->
</head>
<body>
<!-- ... --->
</body>
@bschulz87
bschulz87 / Time-based-auto-scaling-on-fargate.md
Created April 10, 2020 08:44 — forked from toricls/Time-based-auto-scaling-on-fargate.md
Example: Time-based Auto Scaling on Amazon ECS + AWS Fargate

Set parameters

$ export ECS_CLUSTER_NAME={YOUR_ECS_CLUSTER_NAME}
$ export ECS_SERVICE_NAME={YOUR_ECS_SERVICE_NAME}

RegisterScalableTarget

From 7f8939186cb26bf950c6326657edc0b973a8709c Mon Sep 17 00:00:00 2001
From: Benjamin Schulz <[email protected]>
Date: Wed, 14 Sep 2022 14:29:28 +0200
Subject: [PATCH] Fix starqltechn
---
META-INF/com/google/android/update-binary | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/META-INF/com/google/android/update-binary b/META-INF/com/google/android/update-binary