Skip to content

Instantly share code, notes, and snippets.

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

Jannik apfelbox

🥑
hi there!
View GitHub Profile
parameters:
test: ["a", "b", 123]
# or
parameters:
test:
- "a"
- "b"
- 123
@apfelbox
apfelbox / LineBreakPlugin.php
Last active December 14, 2015 06:09
Simple plugin for usage in Status.Net, so that the notices keep line breaks.
<?php
/*
* StatusNet - the distributed open-source microblogging tool
* Copyright (C) 2009,2011 StatusNet, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
@apfelbox
apfelbox / addons.txt
Created November 18, 2012 12:53
WoW-Addons Herdentier
## Spieler:
Shadowed Unit Frames http://www.curse.com/addons/wow/shadowed-unit-frames
ShadowedUF Aura Indicators http://www.curse.com/addons/wow/shadoweduf-grid
## Plaketten:
Tidy Plates http://www.curse.com/addons/wow/tidy-plates
Tidy Plates: Threat Plates http://www.curse.com/addons/wow/tidy-plates-threat-plates
@apfelbox
apfelbox / a.html
Created September 6, 2012 12:39
POST example
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Test</title>
<script src="http://code.jquery.com/jquery-1.8.1.min.js"></script>
</head>
<body>
<input type="text" name="length" value="500" id="length" />
<button>Send</button>
@apfelbox
apfelbox / gist:3207987
Created July 30, 2012 15:56
Sanitizer
<?php
class Sanitizer
{
/**
* Returns a url-sanitized string
* @static
* @param string $string
* @return string
*/
@apfelbox
apfelbox / SassMeister-input.scss
Created June 25, 2014 11:34
Generated by SassMeister.com.
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// ----
@mixin fontface($fontname: "", $fontfile: "", $path: "", $weightnames: "", $weightnos: "", $fontvariant: "") {
$totalnofonts: length($weightnames);
@if ($totalnofonts > 0) {
$path: $path + $fontfile;
$i: 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
@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");
@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 / 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: {