Skip to content

Instantly share code, notes, and snippets.

View WengerK's full-sized avatar
🤓

Kevin Wenger WengerK

🤓
View GitHub Profile
@WengerK
WengerK / By attributes
Created November 21, 2012 11:00
Dynamic change title & meta page on ASP
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Title="MyTitle" Inherits="ASP1._Default" MasterPageFile="~/MasterPage.Master" %>
@WengerK
WengerK / drupal.module
Created February 27, 2014 15:26
Drupal custom module - How to disable 'promote to front page' and 'sticky' options?
<?php
/**
* Use hook_form_alter to unset both options on node edit forms.
* But on the main admin content page, the options still appear under 'Update options' dropdown.
*/
/**
* Implements hook_form_alter().
* This is remove the promote to frontpage, and make sticky options from node edit pages
@WengerK
WengerK / gist:7f42c07aa5f12ab741b4
Last active August 29, 2015 14:16
Check for SSL FREAK Vulnerability
# Fire this command to check your vulnerability
# A handshake failure signifies that EXPORT cipher is not active on the server and it is safe.
openssl s_client -connect www.google.com:443 -cipher EXPORT
@WengerK
WengerK / .htaccess
Created May 3, 2016 18:58 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@WengerK
WengerK / mails.php
Created June 6, 2016 14:09
Drupal 8 - Send mail with Swiftmailer
<?php
use Drupal\Core\Render\Markup;
/**
* Mail hook
*/
function hook_mail($key, &$message, $params) {
$options['langcode'] = $message['langcode'];
@WengerK
WengerK / fields.php
Created June 13, 2016 08:25
Drupal 8 - Liste of fields types
// The list of possible types:
kint(\Drupal::service('plugin.manager.field.field_type')->getDefinitions());
@WengerK
WengerK / README.md
Last active June 20, 2019 15:21
Drupal 8  —  Differences between Configuration API & State API

Article Ressources - Drupal 8  —  Differences between Configuration API & State API

This is the Gist repository for my article Drupal 8  —  Differences between Configuration API & State API.

Be aware that this article has been wrote for the Blog of Antistatique — Web Agency in Lausanne, Switzerland. A place where I work as Full Stack Web Developer.

Feel free to read it the full article on Medium or check it out on Antistatique.

@WengerK
WengerK / README.md
Last active February 3, 2021 10:47
MacOS - Trigger Notification Center when long running commands finishes

Article Ressources - MacOS - Trigger Notification Center when long running commands finishes

This is the Gist repository for my article MacOS - Trigger Notification Center when long running commands finishes.

Be aware that this article has been wrote for the Blog of Antistatique — Web Agency in Lausanne, Switzerland. A place where I work as Full Stack Web Developer.

Feel free to read it the full article on Medium or check it out on Antistatique.

@WengerK
WengerK / README.md
Last active August 15, 2016 12:07
What's my IP using PHP CLI

What's my IP using PHP CLI

A mechanism for discovering the IP of the computer using PHP CLI

@WengerK
WengerK / README.md
Last active August 31, 2016 14:42
Atom Stylelint - Undefined rules

Undefined rule "no-missing-eof-newline" -> Renamed as "no-missing-end-of-source-newline"
Undefined rule "media-query-parentheses-space-inside" Renamed as "media-feature-parentheses-space-inside"
Undefined rule "number-zero-length-no-unit" Renamed as "length-zero-no-unit" Undefined rule "property-unit-blacklist" Renamed as "declaration-property-unit-blacklist" Undefined rule "property-unit-whitelist" Renamed as "declaration-property-unit-whitelist" Undefined rule "property-value-blacklist" Renamed as "declaration-property-value-blacklist" Undefined rule "property-value-whitelist" Renamed as "declaration-property-value-whitelist"

Dependencies

  • "gulp-stylelint": "^3.0.0",