Skip to content

Instantly share code, notes, and snippets.

View KyrneDev's full-sized avatar
💭
Solidity 'n stuff

Charlie KyrneDev

💭
Solidity 'n stuff
View GitHub Profile
<?php
/*
* This file is part of Flarum.
*
* For detailed copyright and license information, please view the
* LICENSE file that was distributed with this source code.
*/
namespace Flarum\Extension;
import highlight from 'flarum/helpers/highlight';
import avatar from 'flarum/helpers/avatar';
import username from 'flarum/helpers/username';
export default class UserSearchSource {
view(query) {
if (!query || query.length < 3 || this.loading) return;
if (!app.cache.byobuResults) {
app.cache.byobuResults = [];
<?php
echo "########################################################\nWelcome to the beta 7 to beta 8 Flarum update utility\n########################################################\n\n";
echo "Before we start, make sure you have disabled all of your 3rd party extensions\n";
echo "If you do not disable them before running this utility, your forum WILL BREAK!\n";
echo "Have you disabled your 3rd party extensions? (Type 'yes'): ";
$input = rtrim(fgets(STDIN));
if (strtolower($input) !== 'yes') {
exit(1);
/*
OpenLayers.js -- OpenLayers Map Viewer Library
Copyright (c) 2006-2013 by OpenLayers Contributors
Published under the 2-clause BSD license.
See https://openlayers.org/dev/license.txt for the full text of the license, and https://openlayers.org/dev/authors.txt for full list of contributors.
Includes compressed code under the following licenses:
#!/usr/bin/env bash
echo 'Converting, please wait...'
find . -name '*.js' -print0 | xargs -0 sed -iBackup -e 's/fa fa-/fas fa-/g'
find . -name "*.jsBackup" -type f -delete
echo 'Done!'
@KyrneDev
KyrneDev / convert.sh
Last active September 25, 2018 20:15
Convert your extension to work with beta 8
#!/usr/bin/env bash
echo -e "Script created by \e[1;31mCDK2020\e[0m"
echo 'Converting, please wait...'
find . -name '*.php' -print0 | xargs -0 sed -iBackup -e 's/Flarum\\?Core\\Notification\\NotificationInterface/Flarum\\Notification\\NotificationInterface/g'
find . -name '*.php' -print0 | xargs -0 sed -iBackup -e 's/Flarum\\?Core\\Notification\\NotificationMailer/Flarum\\Notification\\NotificationMailer/g'
find . -name '*.php' -print0 | xargs -0 sed -iBackup -e 's/Flarum\\?Core\\Notification\\NotificationServiceProvider/Flarum\\Notification\\NotificationServiceProvider/g'
find . -name '*.php' -print0 | xargs -0 sed -iBackup -e 's/Flarum\\?Core\\Notification\\NotificationSyncer/Flarum\\Notification\\NotificationSyncer/g'
@KyrneDev
KyrneDev / protected.php
Created July 25, 2017 00:52
Proof of concept for protecting php code
// Original code
<?php
/**
* This file is part of reflar/reactions
*
* Copyright (c) ReFlar.
*
* http://reflar.io