Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

dankkomcg dankkomcg

🎯
Focusing
View GitHub Profile
@dankkomcg
dankkomcg / apache2.4.md
Created Jan 31, 2020
Instalar Apache 2.4 junto a php 7.1 en Windows Server 2008 R2
View apache2.4.md

Instalar Apache2.4

  • Descargar Apache2.4
  • Extraer archivos en el directorio de instalación
  • Modificar el archivo httpd.conf.

Configurar Apache 2.4

  • Modificar el archivo conf\httpd.conf. Cambiar la ruta:

Define SRVROOT "C:\Apache24"

View gist:f8f1205da845d4625947515818e2dd53
IMÁGENES E ICONOS
- https://thenounproject.com/
- https://www.flaticon.com/
VÍDEO
- https://videohive.net
- https://pixabay.com/videos
SVG & SHAPES
- https://bennettfeely.com/clippy/
@dankkomcg
dankkomcg / fix-homebrew-npm.md
Last active Aug 22, 2019 — forked from DanHerbert/fix-homebrew-npm.md
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew
View fix-homebrew-npm.md

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.

Solution

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
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
security:
encoders:
FOS\UserBundle\Model\UserInterface: sha512
role_hierarchy:
ROLE_SUPER_ADMIN: ROLE_ADMIN
ROLE_ADMIN: [ROLE_USER, ROLE_TOURNAMENT_MANAGER, ROLE_EDITOR]
ROLE_TOURNAMENT_MANAGER: [ROLE_USER, ROLE_EDITOR]
ROLE_EDITOR: ROLE_USER
@dankkomcg
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
dankkomcg / wp_rewrite.php
Created Dec 14, 2018
Rewrite from script instead of WP-Admin
View wp_rewrite.php
<?php
add_action( 'init', function() {
global $wp_rewrite;
$wp_rewrite->set_permalink_structure(
// you have to know the permalink rules on WordPress
'/%year%/%monthnum%/%postname%/'
);
} );
@dankkomcg
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
<?php
// source: http://wordpress.stackexchange.com/questions/211703/need-a-simple-but-complete-example-of-adding-metabox-to-taxonomy
// code authored by jgraup - http://wordpress.stackexchange.com/users/84219/jgraup
// CREATE CUSTOM TAXONOMY
add_action( 'init', '___create_my_custom_tax' );
@dankkomcg
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
<?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;
});
You can’t perform that action at this time.