Skip to content

Instantly share code, notes, and snippets.

View apfelbox's full-sized avatar
🥑
hi there!

Jannik apfelbox

🥑
hi there!
View GitHub Profile
diff --git cms-page-order.php cms-page-order.php
index 51d2b9e333c3cc83c75842fbbcf7e8ab65b41e06..ddfabb28bd6dfec09067eb36f8b8a028a4678e62 100644
--- cms-page-order.php
+++ cms-page-order.php
@@ -350,15 +350,15 @@ function cmspo_do_err() {
/** Special Walker for the Pages */
class PO_Walker extends Walker_Page {
- function start_lvl(&$output, $depth) {
+ function start_lvl(&$output, $depth = 0, $args = array() ) {
@apfelbox
apfelbox / hover-navbar.js
Last active January 4, 2016 00:19
Add Bootstrap hover dropdowns and make dropdown-toggle item clickable.1. Just don't add `data-toggle="dropdown"`2.1 JS: Load this code (hover-navbar.js)2.2 CSS: Add this code (hover-navbar.css)(not both, just one of them)
(function ($)
{
"use strict";
$(".navbar .nav")
.on("mouseenter", "li.dropdown", onMouseEnter)
.on("mouseleave", "li.dropdown", onMouseLeave);
/**
* Callback on mouse enter
@apfelbox
apfelbox / Codepad.php
Created February 13, 2014 10:01
Proof of Concept code for http://dev.apfelbox.net/simple_codepad/ (don't use it in production!)
<?php
class Codepad
{
/**
* Generates a new id and the file behind
*
* @return string
*/
public function generateNewId ()
@apfelbox
apfelbox / ga.js
Last active August 29, 2015 13:56
First draft for Google Analytics lib
window.Becklyn = (function (Becklyn, window, document) {
"use strict";
/**
* The settings as set by the initialization
*
* @type {Object}
*/
var settings;
@apfelbox
apfelbox / Gruntfile.js
Created March 19, 2014 18:22
Example code for `grunt-browserify` issue.
module.exports = function(grunt) {
grunt.loadNpmTasks("grunt-browserify");
grunt.initConfig({
browserify: {
app: {
options: {
transform: ['browserify-shim']
},
@apfelbox
apfelbox / _imp1.scss
Created March 20, 2014 16:45
Weird behaviour of `@extend` with `%` placeholder selectors.
@import "inc";
.imp1 {
@extend %test;
}
@apfelbox
apfelbox / Gruntfile.js
Created April 3, 2014 16:01
PoC for grunt sass for symfony config
module.exports = function(grunt) {
var path = require("path");
grunt.loadNpmTasks("grunt-contrib-sass");
grunt.initConfig({
sass: {
bundles: {
options: {
@apfelbox
apfelbox / IE9.Win7.For.MacParallels.part01.sfx
Created April 9, 2014 07:41
Error messages when downloading the IE9 VM for OSX with Parallels from modern.ie - the direct links work.
<?xml version="1.0" encoding="utf-8"?><Error><Code>BlobNotFound</Code><Message>The specified blob does not exist.
RequestId:57420d5a-15a4-4784-bd28-256c7d5f82a5
Time:2014-04-09T07:39:59.3686754Z</Message></Error>
@apfelbox
apfelbox / SassMeister-input.scss
Created May 19, 2014 07:32
Generated by SassMeister.com.
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
.foo {
@at-root {
@font-face {
font-family: "Ionicons";
src:url("../fonts/ionicons.eot?v=1.4.0");
// Function for returning the user to any 'y' position in a Facebook app/tab. Uses jQuery animate, otherwise gracefully falls-back without it.
// Source[1]: http://stackoverflow.com/questions/7193425/how-do-you-animate-fb-canvas-scrollto
// Source[2]: https://developers.facebook.com/docs/reference/javascript/FB.Canvas.scrollTo/
function scrollinFacebook (toY, duration) {
if (FB.Canvas.getPageInfo) {
FB.Canvas.getPageInfo (function (pageInfo) {
$({ y: pageInfo.scrollTop })
.animate({
y: toY