Skip to content

Instantly share code, notes, and snippets.

DerPixler derpixler

Block or report user

Report or block derpixler

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
View scrollNavi.test.js
let ScrollNavi = require('../base_scrollNavi');
let mouseEventMock = {
preventDefault: () => {},
stopPropagation: () => {}
};
window.scrollBy = jest.fn();
@derpixler
derpixler / awsmAdditionalStyle.js
Last active Apr 16, 2019
CloneNodes and add clonedElements
View awsmAdditionalStyle.js
var awsmAdditionalStyle = function (additionals = []) {
this.listElem = document.querySelector('.awsm-preset-list');
this.additionals = additionals ? additionals : [];
if(this.listElem && this.additionals) {
this.input = this.listElem.querySelector('input');
this.label = this.listElem.querySelector('label');
var cloneInput = function (additionals) {
if (!this.input) {
View package.json
{
"name": "@derpixler/jest-prototype-tests",
"version": "1.0.0",
"description": "",
"main": "the-prototype.js",
"scripts": {
"test": "jest"
},
"jest": {
"verbose": true,
View iso_3166-2.json
{
"de": {
"longTerm": "germany",
"isoAlpha2": "de",
"isoAlpha3": "deu"
},
"at": {
"longTerm": "austria",
"isoAlpha2": "at",
"isoAlpha3": "aut"
View toro-form-ref-cookie-transmitter.php
@derpixler
derpixler / PHPstorm-live-template.php
Last active Feb 17, 2017
PHPstorm better DebugSnipped
View PHPstorm-live-template.php
/**
* 1. Goto Preferences -> Editor -> Live Template -> PHP
* 2. Klick in the right +
* 3. chose Live Template
* 4. Give a abbreviation like "pdebug"
* 5. Copie the Template into Template Text
* 6. in your code Type "pdeb.." use auto compleate ;)
*
* You get a Debug like this.
*
@derpixler
derpixler / .bashrc
Created Jan 30, 2017
beautiful promt
View .bashrc
[ -r /etc/bashrc ] && source /etc/bashrc
[ -r /etc/bash_completion ] && source /etc/bash_completion
[ -r ~/.git-completion.bash ] && source ~/.git-completion.bash
[ -r ~/.git-prompt.sh ] && source ~/.git-prompt.sh
[ -r /usr/local/rvm/scripts/rvm ] && source /usr/local/rvm/scripts/rvm
__has_parent_dir () {
# Utility function so we can test for things like .git/.hg without firing up a
# separate process
test -d "$1" && return 0;
@derpixler
derpixler / functions.php
Last active Jan 9, 2017
Refactored WordPress theme uku nav menu loader by @elmastudio
View functions.php
<?php
/**
* Uku functions and definitions
*
* Change note:
* @see line 31 - 40 remove register nav_menu, this is merge into inc/nav-menu.php
* @see line 987 - 990 require nav-menu.php
*
* @package Uku
* @since Uku 1.0
@derpixler
derpixler / load_plugin_assets.php
Last active Dec 12, 2016
Load custom WordPress templates or assets like js, css
View load_plugin_assets.php
<?php
/**
* Load template or assets
*
* @param $tpl
* @param $type
*/
function load_plugin_assets( $tpl, $type = 'php' ){
$default_tpl = $tpl . '.’ . $type;
@derpixler
derpixler / AdminMenu.php
Created Oct 17, 2016
abstract wordpress AdminMenu class
View AdminMenu.php
<?php # -*- coding: utf-8 -*-
namespace my_plugin\admin_menu;
use my_plugin\functions as Functions;
/**
* Abstract AdminMenu class
*
* Provides methods to create admin menues
You can’t perform that action at this time.