Skip to content

Instantly share code, notes, and snippets.

View kricore's full-sized avatar

Krikor Boghossian kricore

  • Greece
View GitHub Profile
@kricore
kricore / functions.php
Created September 1, 2015 21:52
Greeklish permalinks for Wordpres - NOT MINE
<?php
// Paste this function in your theme's function.php file
function greeklish_permalinks_sanitize_title($text) {
if ( !is_admin() ) return $text;
$expressions = array(
'/[αΑ][ιίΙΊ]/u' => 'e',
'/[οΟΕε][ιίΙΊ]/u' => 'i',
'/[αΑ][υύΥΎ]([θΘκΚξΞπΠσςΣτTφΡχΧψΨ]|\s|$)/u' => 'af$1',
@kricore
kricore / webpack.config.js
Last active March 23, 2019 17:13
Kinda defeats the purpose of CSS modules but if you want to use (raw) Bootstrap alongside with CSS modules here you go:
// "postcss" loader applies autoprefixer to our CSS.
// "css" loader resolves paths in CSS and adds assets as dependencies.
// "style" loader turns CSS into JS modules that inject <style> tags.
// In production, we use a plugin to extract that CSS to a file, but
// in development "style" loader enables hot editing of CSS.
// SASS loader
// https://medium.com/@Connorelsea/using-sass-with-create-react-app-7125d6913760
{
test: /\.scss$/,
@kricore
kricore / gist:b8abca7732d614a771b1
Created June 26, 2014 13:53
SigPro German Translation.
JGRID_CHECKBOX_ROW_N="Checkbox für row %d"
COM_SIGPRO___NONE_SELECTED__="-- nichts ausgewählt --"
COM_SIGPRO_YOU_ARE_GOING_TO_DELETE_PERMANENTLY_THE_SELECTED_IMAGES_FROM_THE_SERVER_ARE_YOU_SURE="Sie werden das(die) ausgewählten Bild(er)r dauerhaft vom Server löschen. Sind Sie sicher?"
COM_SIGPRO_YOU_ARE_GOING_TO_DELETE_PERMANENTLY_THE_SELECTED_FOLDERS_FROM_THE_SERVER_ARE_YOU_SURE="Sie werden den(die) ausgewählten Ordner dauerhaft vom Server löschen. Sind Sie sicher?"
COM_SIGPRO_WRITABLE="beschreibbar"
COM_SIGPRO_VIEW="Ansicht"
COM_SIGPRO_USE_COMPONENT_SETTING="- vererbte Komponenten-Einstellung -"
COM_SIGPRO_USER_GALLERIES="Benutzergalerien"
COM_SIGPRO_TYPE_A_FOLDER_NAME_TO_CREATE_THE_GALLERY="vergeben Sie einen Ordnernamen, um die Galerie zu erstellen"
COM_SIGPRO_TYPE="Typ"
@kricore
kricore / pl-PL.com_k2.ini
Created October 2, 2017 15:55
Polish lang file
;/**
; * @version 2.8.x
; * @package K2
; * @author JoomlaWorks http://www.joomlaworks.net
; * @copyright Copyright (c) 2006 - 2017 JoomlaWorks Ltd. All rights reserved.
; * @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
; */
COM_K2="K2"
COM_K2_CONFIGURATION="Konfiguracja K2"
@kricore
kricore / gist:5f90c8b2301b3016f61017b42b1b9e8b
Created August 11, 2017 09:59
Install React & dependencies
#https://stackoverflow.com/documentation/reactjs/7480/setting-up-react-environment/24700/configure-webpack#t=201708110804335488513
# install react and react-dom
$ npm i react react-dom --save
# install webpack for bundling
$ npm i webpack -g
# install babel for module loading, bundling and transpiling
$ npm i babel-core babel-loader --save
@kricore
kricore / base.php
Created July 3, 2017 10:29
AllVideos 4.8.0 RC base.php file
<?php
/**
* @version 4.8.0
* @package AllVideos (plugin)
* @author JoomlaWorks - http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2016 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
<?php
/**
* @version 2.7.x
* @package K2
* @author JoomlaWorks http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2016 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
@kricore
kricore / default.php
Last active February 24, 2017 04:57
Simple Image Gallery Pro responsive template using Foundation's block grid.
<?php
/**
* @version 3.0.x
* @package Simple Image Gallery Pro
* @author JoomlaWorks - http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2014 JoomlaWorks Ltd. All rights reserved.
* @license http://www.joomlaworks.net/license
*/
// no direct access
@kricore
kricore / functions.php
Created December 16, 2016 11:43
Filter the correct language on WordPress archive pages based on the lang $_GET param.
<?php
/**
* Language Detection
* @param $query,
* @uses pre_get_posts filter
* @return the modified query
*/
function kdk_exclude_category( $query ) {
if ( ($query->is_tag() && $query->is_main_query()) ||
@kricore
kricore / template.css.php
Last active August 18, 2016 13:47
Responsive: FPSS Movies Template
<?php
if(!isset($fpssTemplateIncluded)){
header("Content-type: text/css; charset: utf-8");
$width = (int) $_GET['width'];
$height = (int) $_GET['height'];
$sidebarWidth = (int) $_GET['sidebarWidth'];
$thumbnailViewportWidth = (int) $_GET['thumbnailViewportWidth'];
$thumbnailViewportHeight = (int) $_GET['thumbnailViewportHeight'];
$timer = (bool) $_GET['timer'];
$mid = (int) $_GET['mid'];