Skip to content

Instantly share code, notes, and snippets.

@Illvili
Illvili / report.sh
Created January 26, 2024 18:36
PalWorld mem report with rcon
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
cd /home/lighthouse/rcon
rss=$(ps aux | grep PalServer-Linux | grep -v grep | awk '{print $6"000"}')
max_mem=15000000000
percent=$(bc <<< "scale=2; $rss*100/$max_mem")
p_len=30
nth=$(($rss*$p_len/$max_mem))
p_full=##############################
@Illvili
Illvili / colors.css
Created May 29, 2015 01:21
moegirl-flatten-navbox-colors
.moegirl-flatten-navbox-wrapper > .moegirl-flatten-navbox-subgroup > .moegirl-flatten-navbox-title {
background: #ccccff;
}
.moegirl-flatten-navbox-wrapper > .moegirl-flatten-navbox-subgroup > .moegirl-flatten-navbox-content > .moegirl-flatten-navbox-subgroup > .moegirl-flatten-navbox-title {
background: #ddddff;
}
.moegirl-flatten-navbox-title {
background: #e6e6ff;
}
.moegirl-flatten-navbox-wrapper > .moegirl-flatten-navbox-subgroup {
public class DVD {
public String Title;
public DVD(String t) {
this.Title = t;
}
}
@Illvili
Illvili / moegirl-hide-common-box.js
Last active August 29, 2015 14:17
moegirl hide common box
$(function () {
if (window.mw && !!mw.config.get('wgNamespaceNumber')) return;
var contentParent = $('#mw-content-text');
if (!contentParent.length) contentParent = $('#content');
var commonBoxes = contentParent.find('.common-box');
if (!commonBoxes.length) return;
var commonBoxContainer = $('<div id="commonBoxContainer"><div id="commonBoxInfo"></div></div>').prependTo(contentParent);
var commonBoxList = $('<div id="commonBoxList"></div>').appendTo('#commonBoxInfo');
@Illvili
Illvili / html5mp3.php
Created March 3, 2015 03:44
MW mp3 resolve file url
<?php
if ( ! defined( 'MEDIAWIKI' ) )
die();
/*******************************************************************************
* *
* HTML5MP3 Extension is base on FlashMP3 *
* *
* FlashMP3 Extension by Matthias Korn to embed a flash player with mp3-files *
@Illvili
Illvili / rank.all.js
Created March 2, 2015 07:19
Moegirl iOS APP Statics Rank Style
!function(){$(function(){$(".moe-group").each(function(){var o,r=$(this),e=parseInt(r.children(".moe-rank").text()),n=parseInt(r.children(".moe-prev").text());if(isNaN(n))o="fresh";else switch(Math.sign(e-n)){case-1:o="up";break;case 0:o="eq";break;case 1:o="down"}r.children(".moe-rank").addClass(o).prepend('<span class="rank-diff-icon"></span>')}),$("head").append('<style>.moe-rank .rank-diff-icon{position:relative;display:inline-block;margin-right:.5em;width:1em;height:1em;line-height:1em;border-radius:100%;text-align:center;color:#fff;vertical-align:-2px;box-sizing:border-box}.moe-rank.up .rank-diff-icon{background-color:#f94343}.moe-rank.down .rank-diff-icon{background-color:#11ba47}.moe-rank.eq .rank-diff-icon{background-color:#43a5f9}.moe-rank.fresh .rank-diff-icon{background-color:#f94343}.moe-group:nth-child(1) .rank-diff-icon{border:1px solid #eaad2b;background-color:#f4bc45;box-shadow:#f4bc45 0 0 5px}.moe-group:nth-child(2) .rank-diff-icon{border:1px solid #a0a0a0;background-color:#cdcdcd;box-shadow
@Illvili
Illvili / qr-download.php
Last active October 29, 2015 09:55
APP QR Download Detect
<?php
// 地址配置
$iOSAPPStoreLink = '[iOS APP Store Link here]';
$AndroidLink = '[APK Link here]';
function redirect($url) {
header('Location: ' . $url);
exit();
}
@Illvili
Illvili / moegirl-mainpage-mobile-style.css
Created February 5, 2015 03:42
moegirl-mainpage-mobile-style.css
@media screen and (max-width: 1023px) {
/* MainPage restyle */
#moegirl-content > [style="position:relative; background-color:transparent; margin: 0 -1em;"] {
margin: 0 10px !important;
}
#mainpage {
width: auto;
}
#mainpage .mainpage-newsbox, #mainpage .mainpage-box {
float: none;
@Illvili
Illvili / collapsible-fix.css
Last active August 29, 2015 14:13
collapsible-fix
.mw-collapsible.wikitable {
display:table;
}
.mw-collapsible.wikitable img {
max-width:100%;
}
.mw-collapsible > tbody > tr:first-child > th {
position:relative;
padding-left:3em;
}