Skip to content

Instantly share code, notes, and snippets.

View NuarHaruha's full-sized avatar

nuarharuha NuarHaruha

View GitHub Profile
@alexalouit
alexalouit / fix.sh
Last active February 12, 2021 15:52
fix Logstash error "logstash load error: ffi/ffi -- java.lang.NullPointerException: null" on Raspbian
#!/bin/bash
# based on https://github.com/mew2057/CAST/blob/6c7f7d514b7af3c512635ec145aa829c535467dc/csm_big_data/config-scripts/logstashFixupScript.sh
# see: https://github.com/elastic/logstash/issues/10755
apt-get update
apt-get install -f zip unzip
STARTDIR=$(pwd)
JARDIR="/usr/share/logstash/logstash-core/lib/jars"
@NuarHaruha
NuarHaruha / autobreak-iframe.js
Created November 12, 2011 07:43
Safely break out of an iframe for blogspot/blogger
/***
Safely break out of an iframe for blogspot.com
@author Nuar H. Noah
*/
var myblog = { hostname: top.location.hostname, whitelist: Array() }
myblog.breakfree = function(){
if (top.location != self.location) {
var curDomain = this.hostname.split('.')[1];
this.whitelist['blogspot'] = 1;
<?php
/**
* Register an Admin Page - Example
*
* NOTE: MU Plugin.
*
* @author hakre <http://hakre.wordpress.com/>
* @link http://wordpress.stackexchange.com/questions/1778/admin-config-screen-without-menu
*/