Skip to content

Instantly share code, notes, and snippets.

View moso's full-sized avatar

Morten Sørensen moso

View GitHub Profile
@moso
moso / keybase.md
Last active November 26, 2019 09:40

Keybase proof

I hereby claim:

  • I am moso on github.
  • I am moso (https://keybase.io/moso) on keybase.
  • I have a public key whose fingerprint is C488 8511 DD9F 2946 77AA 8D7A D9DA DA1D 4BCF 9A33

To claim this, I am signing this object:

### Proprosed Danish/International fixes by Dane Playing FM
#Denmark
"COMP_LONG_NAME_CHANGE" 6 "Alka Superligaen" "Danish"
"COMP_SHORT_NAME_CHANGE" 6 "Superliga" "Danish"
"COMP_LONG_NAME_CHANGE" 7 "1. Division" "Danish"
"COMP_SHORT_NAME_CHANGE" 7 "1. Division" "Danish"
"COMP_LONG_NAME_CHANGE" 1701138 "2. Division Øst" "Danish"
"COMP_SHORT_NAME_CHANGE" 1701138 "2. Division Øst" "Danish"
"COMP_LONG_NAME_CHANGE" 1701139 "2. Division Vest" "Danish"
"COMP_SHORT_NAME_CHANGE" 1701139 "2. Division Vest" "Danish"
### Proposed Danish/International fixes by Dane Playing FM
#Denmark
"AWARD_NAME_CHANGE" 938438 "Arla U21 Talent Pris" "Danish"
"AWARD_NAME_CHANGE" 938458 "Arla U19 Talent Pris" "Danish"
"AWARD_NAME_CHANGE" 938476 "Arla U17 Talent Pris" "Danish"
"AWARD_NAME_CHANGE" 938651 "Canal + : Månedens Mål" "Danish"
"AWARD_NAME_CHANGE" 925008 "Årets Talent" "Danish"
"AWARD_SHORT_NAME_CHANGE" 106909 "Årets Fodboldspiller" "Danish"
"AWARD_LONG_NAME_CHANGE" 106909 "Landsbankinn : Årets Danske Fodboldspiller" "Danish"
"AWARD_SHORT_NAME_CHANGE" 930999 "Årets Hold" "Danish"

Create partition on empty drive

  • Start fdisk - change /dev/sda2 with your harddrive.
sudo fdisk /dev/sda
  • Select p to view all partitions.
  • Select n to create a new partition.
  • Type p for primary partition.
  • Enter which number partition the partition is on the harddrive. Typically 1.
@moso
moso / app.js
Last active December 15, 2022 07:28
laravel-mix config
// jQuery import
global.jQuery = require('jquery');
var $ = global.jQuery;
window.$ = $;
// Bootstrap 4 depends on Popper.js
// Popper.js import
//import Popper from 'popper.js';
//window.Popper = Popper;
@moso
moso / README.md
Last active March 7, 2019 15:21
WordPress snippets

WP_HEAD cleanup

/*!
 * WP_HEAD cleanup
 * This removes bogus markup, stylesheets, and scripts from the `<head>`-tag in WordPress installations.
 * It also unregisters the built-in version of jQuery, so you can register your own, updated version of jQuery.
 */
function moso_cleanup() {
    remove_action('wp_head', 'feed_links_extra', 3);                      // Category feeds
    remove_action('wp_head', 'feed_links', 2);                            // Post and comment feeds
@moso
moso / functions.php
Created March 22, 2017 13:03
Bootstrap 4 Navbar Walker for WordPress
<?php
// BOOTSTRAP 4 NAVBAR INTEGRATION
class bs4_walker_nav_menu extends Walker_Nav_menu {
function start_lvl( &$output, $depth = 0, $args = array() ){ // ul
$indent = str_repeat("\t",$depth); // indents the outputted HTML
$submenu = ($depth > 0) ? ' sub-menu' : '';
$output .= "\n$indent<ul class=\"dropdown-menu$submenu dropdown-menu-right depth_$depth\">\n";
}
function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ){ // li a span
$indent = ( $depth ) ? str_repeat("\t",$depth) : '';
@moso
moso / git-init.txt
Created March 22, 2017 13:56
git init
git init
git add --all
git commit -m "Initial Commit"
git remote add origin ssh://<url>
git push -u origin master
@moso
moso / README.md
Last active May 21, 2024 00:45
Sass: remove the Material Design Icons cache-busting version string

Removing the cache-busting version string from Material Design Icons with Sass

I like to use webpack and npm. And since Material Design Icons has a nice and neat npm package, I usually just import it. However, if you want a higher score on, eg, PageSpeed or Pingdom, you'll need to get rid of the ?v=<version>-string, as they see the version string as socalled cache busting.

Modifying the output CSS file manually isn't the right solution, as we want something automated. And we do, since we're using webpack in the first place. So we'll insert the content of the node_modules/mdi/scss/materialdesignicons into our own _mdi.scss-file, and exchange the parts that contains the nasty version string. This way we don't have to maintain a copy of Material Design Icons or any of their files, and it's not going to break any updates from their side.

The version string resides inside node_modules/mdi/scss/_path.scss, which contains the @font-face-selector we want to edit. So by copying the seletor into our n

@moso
moso / browserprivacy.md
Last active April 1, 2018 17:41
Browser extensions and -privacy settings

Extensions

Adblocking

uBlock Origin

An efficient blocker. Easy on CPU and memory.

Antitracking

Privacy Badger