Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexis Tan Senither

View GitHub Profile
View result.json
{
"status": 200,
"data": {
"id": "18e174ef078f42758dcd51d495d1096b",
"name": "Watermelon",
"username": "Senither",
"last_save_at": {
"time": 1620684302314,
"date": "2021-05-10T22:05:02.314Z"
},
View result.json
{
"status": 200,
"data": [
{
"id": "18e174ef078f42758dcd51d495d1096b",
"name": "Watermelon",
"username": "Senither",
"last_save_at": {
"time": 1620684302314,
"date": "2021-05-10T22:05:02.314Z"
@Senither
Senither / MiddlewareStack.java
Created May 18, 2018
Middleware stack for Ava that adds the system command check for all commands
View MiddlewareStack.java
package com.avairebot.middleware;
import com.avairebot.AvaIre;
import com.avairebot.commands.CommandContainer;
import com.avairebot.contracts.commands.Command;
import com.avairebot.contracts.middleware.Middleware;
import com.avairebot.handlers.DatabaseEventHolder;
import com.avairebot.middleware.global.IncrementMetricsForCommand;
import com.avairebot.middleware.global.IsCategoryEnabled;
import com.avairebot.middleware.global.ProcessCommand;
View client-requirements.md

PI: Client Requirements

  • apache2 / enginx
  • php >= v7.2
    • php7.2-common
    • php7.2-curl
    • php7.2-json
    • php7.2-mbstring
    • php7.2-zip
  • composer
@Senither
Senither / xbMarquee.js
Created Apr 20, 2018
A formatted version of xb Marquee JS
View xbMarquee.js
/*
* $Id: xbMarquee.js,v 1.21 2003/09/14 21:22:26 bc Exp $
*
*/
/* ***** BEGIN LICENSE BLOCK *****
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
View Prometheus metrics for Ava - Example
# HELP avaire_guilds_total Total number of guilds the bot is in
# TYPE avaire_guilds_total gauge
avaire_guilds_total 6655.0
# HELP lavalink_players_current Amount of players
# TYPE lavalink_players_current gauge
lavalink_players_current{node="local",} 26.0
# HELP lavalink_playing_players_current Amount of playing players
# TYPE lavalink_playing_players_current gauge
lavalink_playing_players_current{node="local",} 23.0
# HELP lavalink_uptime_seconds Uptime of the node
@Senither
Senither / edit.blade.php
Created Apr 9, 2018
Edit page resource from Yggdrasil
View edit.blade.php
@extends('layouts.yggdrasil')
@section('page-title', 'Edit Page: ' . $page->name)
@section('title', 'Edit page: ' . $page->name)
@section('breadcrumbs')
<li><a href="{{ route('admin.home') }}">Home</a></li>
<li><a href="{{ route('admin.pages.index') }}">Pages</a></li>
<li><a href="#">Display Pages</a></li>
<li class="active">{{ $page->name }}</li>
@Senither
Senither / LeaveServerCommand.java
Created Feb 14, 2018
A simple "leave server command" made for Bramble from the AvaIre Central Discord server.
View LeaveServerCommand.java
package com.avairebot.commands.system;
import com.avairebot.AvaIre;
import com.avairebot.commands.CommandMessage;
import com.avairebot.contracts.commands.SystemCommand;
import net.dv8tion.jda.core.entities.Guild;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@Senither
Senither / .bashrc
Created Feb 6, 2018
My bashrc file
View .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@Senither
Senither / .bashrc
Created Sep 15, 2017
My bashrc file
View .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace