Skip to content

Instantly share code, notes, and snippets.

View H7-25's full-sized avatar

Filippo Cortigiani H7-25

View GitHub Profile
<?php
$style = "include/style.php";
$js = "include/js.php";
$dom = new DOMDocument;
$dom->loadHTMLFile('/home/kiwi/public_html/index.html');
$head = $dom->getElementsByTagName('head')->item(0);
$css = $head->getElementsByTagName("link")->item(1);
$fh = fopen($style, 'w');
function randString(n) {
if(!n)
{
n = 5;
}
var text = '';
var possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
for(var i=0; i < n; i++)
@H7-25
H7-25 / m_filter.cpp
Created November 19, 2018 13:14
Revisited m_filter.cpp
/*
* InspIRCd -- Internet Relay Chat Daemon
*
* Copyright (C) 2009 Daniel De Graaf <[email protected]>
* Copyright (C) 2004, 2008 Craig Edwards <[email protected]>
* Copyright (C) 2007 Dennis Friis <[email protected]>
* Copyright (C) 2007 Robin Burchell <[email protected]>
*
* This file is part of InspIRCd. InspIRCd is free software: you can
* redistribute it and/or modify it under the terms of the GNU General Public
/*
* InspIRCd -- Internet Relay Chat Daemon
*
* Copyright (C) 2009-2010 Daniel De Graaf <[email protected]>
* Copyright (C) 2008 Craig Edwards <[email protected]>
*
* This file is part of InspIRCd. InspIRCd is free software: you can
* redistribute it and/or modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation, version 2.
*
.kiwi-statebrowser-register {
position: absolute;
top: 0;
left: 32px;
width: auto;
text-align: left;
padding: 0 10px;
font-size: 1em;
box-sizing: border-box;
line-height: 35px;
#!/usr/bin/php
<?php
include('includes/geoip.inc');
include 'includes/tor.class.php';
include 'includes/ip2asn/src/ip2asn.php';
use peterkahl\ip2asn\ip2asn;
$active = null;
$debug = in_array ('-debug', $_SERVER['argv']);
$full = !in_array ('-reduced', $_SERVER['argv']);
@H7-25
H7-25 / m_filter.cpp
Created July 28, 2018 00:16
Modified Filter module
/*
* InspIRCd -- Internet Relay Chat Daemon
*
* Copyright (C) 2009 Daniel De Graaf <[email protected]>
* Copyright (C) 2004, 2008 Craig Edwards <[email protected]>
* Copyright (C) 2007 Dennis Friis <[email protected]>
* Copyright (C) 2007 Robin Burchell <[email protected]>
*
* This file is part of InspIRCd. InspIRCd is free software: you can
* redistribute it and/or modify it under the terms of the GNU General Public
if(is_single() AND get_post_type() == 'post' AND $pluginOptions['enabled'] == 1){
function my_metaTags($content){
global $post;
//echo '<pre>';print_r($post);echo '</pre>';
return $post->post_content.'<div class="social-meta-tags-container">
<div class="social-meta-tags-social social-meta-tags-facebook">
<a target="_blank" href="https://www.facebook.com/sharer.php?u='.urlencode(post_permalink($post->ID)).'">Facebook</a>
<span></span></div>
<div class="social-meta-tags-social social-meta-tags-twitter">
<a target="_blank" href="https://twitter.com/intent/tweet?text='.urlencode($post->post_title).'&url='.urlencode(post_permalink($post->ID)).'">Twitter</a>
<script>
var network = kiwi.components.Network();
function randString(n) {
if(!n)
{
n = 5;
}
var text = '';
var kiwiModules = require('../server/modules');
var module = new kiwiModules.Module('Ident Cookie Module');
module.on('irc connecting', function(event, event_data) {
var cookies = event_data.connection.state.client.websocket.transport.req ?
event_data.connection.state.client.websocket.transport.req.headers.cookie || '' :
'';
//console.log(cookies);
var cookie_val = cookies.match(/[ ;^]?cookie_name=([^;]+)/);