Skip to content

Instantly share code, notes, and snippets.


dankkomcg dankkomcg

Block or report user

Report or block dankkomcg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dankkomcg /
Last active Aug 22, 2019 — forked from DanHerbert/
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.


This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.

Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them.

dankkomcg / webpack.config.js
Created Apr 3, 2019
Default config webpack for JS sites
View webpack.config.js
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin'); //installed via npm
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const webpack = require('webpack'); //to access built-in plugins
module.exports = {
entry: {
index: './src/js/index.js',
shards: './src/js/shards.js'
View secu.yml
FOS\UserBundle\Model\UserInterface: sha512
dankkomcg / php72
Created Mar 5, 2019
Install php7.2 on UBuntu based distros
View php72
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install -y php7.2
sudo apt install php7.2-curl php7.2-gd php7.2-json php7.2-mbstring
# fix mcrypt for php72
sudo apt-get install php7.2-dev # to run phpize
dankkomcg / wp_rewrite.php
Created Dec 14, 2018
Rewrite from script instead of WP-Admin
View wp_rewrite.php
add_action( 'init', function() {
global $wp_rewrite;
// you have to know the permalink rules on WordPress
} );
dankkomcg / add-term-to-custom-taxonomy.php
Created Nov 21, 2018 — forked from ms-studio/add-term-to-custom-taxonomy.php
add term metabox to custom taxonomy - using WP 4.4 term meta functions
View add-term-to-custom-taxonomy.php
// source:
// code authored by jgraup -
add_action( 'init', '___create_my_custom_tax' );
dankkomcg / hide-editor.php
Created Nov 21, 2018 — forked from ramseyp/hide-editor.php
Hide the content editor for certain pages in WordPress
View hide-editor.php
* Hide editor on specific pages.
add_action( 'admin_init', 'hide_editor' );
function hide_editor() {
// Get the Post ID.
View wp-dash-hacks.php
// force one-column dashboard
add_filter('screen_layout_columns', function ($columns) {
$columns['dashboard'] = 1;
return $columns;
add_filter('get_user_option_screen_layout_dashboard', function () {
return 1;
dankkomcg /
Created Nov 16, 2018
Install cert-bot letsencrypt on Ubuntu
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-apache
# Use -d to add even more domains or sub domains if you wish
sudo certbot --apache -d -d
sudo certbot renew --dry-run
dankkomcg / excel_protect_pass.bas
Created Oct 23, 2018
Protect excel with password prompt with VBA
View excel_protect_pass.bas
'Enlaces de interés:
Attribute VB_Name = "OpenExcelWithPassword"
Sub Auto_Open()
You can’t perform that action at this time.