Skip to content

Instantly share code, notes, and snippets.

@wroxbox
wroxbox / hyphenate
Created October 28, 2021 12:23
hyphenate all the things CSS
/* http://clagnut.com/blog/2395/ */
p {
-webkit-hyphens: auto;
-webkit-hyphenate-limit-before: 3;
-webkit-hyphenate-limit-after: 3;
-webkit-hyphenate-limit-chars: 6 3 3;
-webkit-hyphenate-limit-lines: 2;
-webkit-hyphenate-limit-last: always;
-webkit-hyphenate-limit-zone: 8%;
@wroxbox
wroxbox / yml
Created April 13, 2018 07:12
Drupal-VM config for KuntaFi
---
# Available `vagrant_box` values include:
# - beet/box (pre-provisioned, based on Ubuntu 16.04)
# - geerlingguy/centos7
# - geerlingguy/centos6
# - geerlingguy/debian9
# - geerlingguy/debian8
# - geerlingguy/ubuntu1604
# - geerlingguy/ubuntu1404
#http://docs.drupalvm.com/en/3.5.2/other/php-56/
<?php
/**
* @file
* Custom Drush integration.
*/
/**
* Implements hook_drush_command().
*
* @return
From bc93b98212da6ac1a6a0044eaa20da98dff629da Mon Sep 17 00:00:00 2001
From: wroxbox <wroxbox@617756.no-reply.drupal.org>
Date: Fri, 6 Mar 2015 23:05:26 +0200
Subject: [PATCH] atom reference field edit buttons
---
modules/fields/atom_reference/atom_reference.css | 5 +
modules/fields/atom_reference/atom_reference.js | 154 +++++++++++++++++++--
.../fields/atom_reference/atom_reference.module | 37 ++++-
3 files changed, 178 insertions(+), 18 deletions(-)
@wroxbox
wroxbox / scald_fb_channel_feed.php
Last active August 29, 2015 14:15
Scald fetch facebook rss
function scald_fb_channel_feed($atom,$num) {
$path = '';
$libName = "facebook-php-sdk";
libraries_load($libName);
if (($library = libraries_detect($libName)) && !empty($library['installed'])) {
$fb = new facebook(array(
'appId' => 'xxxxxx', // get this info from the facebook developers page
'secret'=> 'xxxxxx' // by registering an app
));
@wroxbox
wroxbox / areena_embed
Last active December 21, 2016 12:29
areena player embed
<!DOCTYPE html>
<html>
<head>
<title>Areena Player</title>
<script type="text/javascript" src="http://player.yle.fi/assets/js/mainEmbed.js"></script>
</head>
<body>
<div class="field field-name-field-videoclip field-type-arenafield-arenaid field-label-hidden">
<div class="field-items">
<div class="field-item even">
@wroxbox
wroxbox / mymodule.module
Created November 19, 2014 09:51
scald atom styles field formatter
<?php
/**
* Implements hook_field_formatter_info().
*/
function mymodule_field_formatter_info() {
$formatters = array(
'scald_atom_styles' => array(
'label' => t('Generate links to imagestyles'),
'field types' => array('atom_reference','image'),
'description' => t('Display Scald atom image in various imagestyles'),
@wroxbox
wroxbox / deploy.php
Created September 15, 2014 20:45
git webhook deploy
<?php
date_default_timezone_set('Europe/Helsinki');
class Deploy {
/**
* A callback function to call after the deploy has finished.
*
* @var callback