Skip to content

Instantly share code, notes, and snippets.

@IrcDirk
IrcDirk / countdown.js
Created January 23, 2023 12:15 — forked from davidbjourno/countdown.js
Simple JavaScript countdown timer
var deadline = 1577836800000; // 00:00:00, January 1, 2020
var display = document.querySelector('#countdown');
function formatTime (milliseconds) {
var seconds = (milliseconds / 1000).toFixed(0);
var minutes = Math.floor(seconds / 60);
var hours = '';
seconds = Math.floor(seconds % 60);

First Working FH5 Save Swapping Guide

Let me preface this by saying this is a new method. It might not work 100% and there might be issues. As of now, its the best you are going to get. The first round of steps is to convert a given save to your own account.

MS Initial Conversion Steps:

Click to expand
@IrcDirk
IrcDirk / allow
Created February 1, 2022 09:24 — forked from Nilpo/allow
CSF Allow AND Ignore Cloudflare IPv4 IP's.
for i in `curl https://www.cloudflare.com/ips-v4`; do csf -a $i; done
Works in Solr 5.3.0, Lucene 5.3.0
Refer to Solr 101 gist to get solr working https://gist.github.com/pslusarz/7de913ac63e36e8983b8#file-gistfile1-txt
1. download lucene and copy the following jars into SOLR_ROOT/server/solr-webapp/WEB-INF/lib
- lucene-analyzers-morfologik-X.X.jar,
- apache-solr-analysis-extras-X.X.jar (not in lucene, but in solr/dist)
- morfologik-fsa-X.X.jar,
- morfologik-polish-X.X.jar
- morfologik-stemming-X.X.jar
2. modify SOLR_ROOT/server/solr/<core>/conf/managed-schema.xml
a) field type definition
@IrcDirk
IrcDirk / html5-starter.html
Created July 11, 2021 16:02 — forked from grevory/html5-starter.html
HTML5 Starter Template
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>HTML5 Starter Template</title>
<meta name="description" content="Starter Template">
<meta name="author" content="Gregry Pike">
<link rel="stylesheet" href="css/styles.css?v=1.0">
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@IrcDirk
IrcDirk / my.cnf
Created February 18, 2021 06:18 — forked from tareqy/my.cnf
Starter MySQL config file for a server with 8GB RAM, innodb and MyISAM.
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
key_buffer_size=32M
query_cache_type=1
query_cache_size=4M
query_cache_limit=24M
tmp_table_size=128M
max_heap_table_size=128M
innodb_buffer_pool_size = 4000M
@IrcDirk
IrcDirk / cmdHere.reg
Last active February 12, 2020 09:25 — forked from witwall/cmdHere.reg
REGEDIT4
[HKEY_CLASSES_ROOT\*\shell\cmdhere]
@="Cmd&Here"
[HKEY_CLASSES_ROOT\*\shell\cmdhere\command]
@="cmd.exe /c start cmd.exe /k pushd \"%L\\..\""
[HKEY_CLASSES_ROOT\Folder\shell\cmdhere]
@="Cmd&Here"
@IrcDirk
IrcDirk / mediaQuery.js
Created January 25, 2019 12:03 — forked from roylory/mediaQuery.js
Media query with Bootstrap grid classes in Javascript
mediaQuery = (function() {
// Same as in bootstrap/_variables.less
// var screenXs = 480; // Not used
var screenSm = 768;
var screenMd = 992;
var screenLg = 1200;
var screenXsMax = screenSm - 1;
var screenSmMax = screenMd - 1;
@IrcDirk
IrcDirk / nested_array.php
Created November 9, 2018 12:27 — forked from mgsmus/nested_array.php
Creating a nested array from items with parent IDs
function makeNested($source) {
$nested = array();
foreach ( $source as &$s ) {
if ( is_null($s['parent_id']) ) {
// no parent_id so we put it in the root of the array
$nested[] = &$s;
}
else {
$pid = $s['parent_id'];
@IrcDirk
IrcDirk / angle-between-points.js
Created January 17, 2018 11:13 — forked from conorbuck/angle-between-points.js
JavaScript: Find the angle between two points
var p1 = {
x: 20,
y: 20
};
var p2 = {
x: 40,
y: 40
};