Skip to content

Instantly share code, notes, and snippets.

View Mindgames's full-sized avatar
:octocat:

Mathias Åsberg Mindgames

:octocat:
View GitHub Profile
@Mindgames
Mindgames / index.html
Created January 7, 2019 04:01
Meeting Time calulator
<div id="waste_calulator" class="container">
<div class="heading p-5">
<h1 class="display-4 text-white text-center">What is your cost<br> of ineffective meetings?</h1>
</div>
<div class="row justify-content-center">
<!-- Meeting time -->
const boolDropdown = [
{
label: 'True',
value: 'true',
},
{
label: 'False',
value: 'false',
},
];
@Mindgames
Mindgames / cloudSettings
Created February 13, 2018 12:03
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-02-13T12:03:35.631Z","extensionVersion":"v2.8.6"}
@Mindgames
Mindgames / cloudSettings
Last active February 13, 2018 10:45
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-02-13T10:45:18.860Z","extensionVersion":"v2.8.6"}
@Mindgames
Mindgames / cloudSettings
Last active November 11, 2017 13:40
Visual Studio Code Settings Sync Gist
{"lastUpload":"2017-11-11T13:40:10.680Z","extensionVersion":"v2.8.5"}
@Mindgames
Mindgames / a.current.js
Created December 7, 2016 11:58 — forked from ryanve/a.current.js
Add `.current` class to anchors that link to the current URL.
//gist.github.com/ryanve/6153436
(function(anchors, url, i, a) {
while ((a = anchors[i++]) && a.classList)
a.href === url && a.classList.add('current');
}(document.getElementsByTagName('a'), location.href, 0));
https://rbgeek.wordpress.com/2014/09/11/block-wordpress-xmlprc-php-ddos-attacks-using-fail2ban/
If access.log is missing open
vim /etc/apache2/apache2.conf
and add..
CustomLog ${APACHE_LOG_DIR}/access.log combined
@Mindgames
Mindgames / index.html
Created August 14, 2016 18:07
Swiper with Toggle btn group
<div class="container">
<div class="nav-group" data-toggle-name="radius_options">
<div onClick="swiper.slideTo(0,400,true);" class="nav active" data-toggle="button">INFO</div>
<div onClick="swiper.slideTo(1,400,true);" class="nav" data-toggle="button">REGLER</div>
<div onClick="swiper.slideTo(3,400,true);" class="nav">ÖVRIGT</div>
</div>
<!-- Swiper -->
@Mindgames
Mindgames / randomMe.html
Last active July 25, 2016 14:41
When user click link send it to one of X random Y
<!-- Add this where you want your link, if you already have a element or button you would like to use, just add onClick="randomMe" to the element code, see example -->
<a onClick="randomMe()" rel="nofollow" href="#">Link do ankiety</a>
<!-- Add this script anywhere on page, it will exectue when user click link / element and will give user a random number between 1 and 100 where we send all with 50 or less to one url and the others with more then 50 to the other one, that should give us a likley 50/50 splitt over time -->
<script>
function randomMe() {
// Generate a number between 1 and 100
var myNumber = Math.floor((Math.random() * 100) + 1);
// If number is over 50..
if (myNumber > 50) {
.container {
max-width: 400px;
margin-top: 100px;
}
#form .form-group {
margin-bottom: 5px;
}
#form .help-block {
display: block;