This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ -z "${1}" ]] || [[ "${1}" == "-h" ]] || [[ "${1}" == "--help" ]] | |
then | |
echo "This is a simple script to keep the local and remote of your forked" | |
echo "repositories fresh. It does so by:" | |
echo " 1. Detecting if the repo's origin and upstream are different (indicating" | |
echo " a fork)" | |
echo " 2. Performing a \`fetch --all\` on the repo to update from origin and" | |
echo " upstream" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
darkice.cfg: | |
[general] | |
duration = 0 # duration of encoding, in seconds. 0 means forever | |
bufferSecs = 1 # size of internal slip buffer, in seconds | |
reconnect = yes # reconnect to the server(s) if disconnected | |
# this section describes the audio input that will be streamed | |
[input] | |
#device = /dev/dsp # OSS DSP soundcard device for the audio input COMMENTED OUT | |
device = default # best configuration as of Ubuntu 16.04 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE wordpress; | |
CREATE TABLE IF NOT EXISTS `wp_commentmeta` ( | |
`meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, | |
`comment_id` bigint(20) unsigned NOT NULL DEFAULT 0, | |
`meta_key` varchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL, | |
`meta_value` longtext COLLATE utf8mb4_unicode_520_ci DEFAULT NULL, | |
PRIMARY KEY (`meta_id`), | |
KEY `comment_id` (`comment_id`), | |
KEY `meta_key` (`meta_key`(191)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!-- inspired by https://myloan.fremontbank.com/ --> | |
<html> | |
<head> | |
<style> | |
#password-validator { | |
position: absolute; | |
z-index: 50; | |
margin-top: 20px; | |
display: none; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# The architecture you want to install. Options: | |
# amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x | |
arch=armhf | |
disk=16G | |
cores=2 | |
RAM=4G | |
# Determine the correct QEMU platform based on the value of $arch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class KeycloakApiClient | |
{ | |
private $secret; | |
public $token; | |
private $base_url; | |
public function __construct($secret, $base_url) { | |
$this->secret = $secret; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Change these to suit | |
export DBUSER=nextcloud | |
export DBPASS= | |
# Install MariaDB | |
apt-get update | |
apt-get install mariadb-server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @copyright Copyright (c) 2021, Platypus Innovations LLC | |
* | |
* @author Andrew Summers | |
* | |
* This snippet provides a way to implement app and category whitelists/ | |
* blacklists on Nextcloud. This is accomplished by creating a dummy | |
* "appstore" on the local system: | |
* - Download the official listings from the Nextcloud servers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function removeLinks($order) { | |
foreach ($order as $key=>$el) { | |
if (is_array($el)) { | |
if ($key === '_links') { | |
unset($order[$key]); | |
} | |
else { | |
$order[$key] = removeLinks($el); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require './vendor/autoload.php'; | |
use Foxy\FoxyClient\FoxyClient; | |
class FoxyCustomClient extends FoxyClient { | |
private $parent_class_filename = ""; | |
private $last_function_line = ""; | |
private $last_function = ""; |
NewerOlder