Skip to content

Instantly share code, notes, and snippets.

View patrickbussmann's full-sized avatar

Patrick Bußmann patrickbussmann

  • Bußmann IT
  • Hanover, Germany
View GitHub Profile
@patrickbussmann
patrickbussmann / token.php
Created October 17, 2019 23:27
Sign in with Apple - PHP
<?php
# composer require web-token/jwt-framework
require_once 'vendor/autoload.php';
use Jose\Component\Core\AlgorithmManager;
use Jose\Component\KeyManagement\JWKFactory;
use Jose\Component\Signature\Algorithm\ES256;
use Jose\Component\Signature\JWSBuilder;
use Jose\Component\Signature\Serializer\CompactSerializer;
@patrickbussmann
patrickbussmann / user-data.txt
Last active April 17, 2023 12:42 — forked from heri16/user-data.txt
Docker-CE Cloud-init for Ubuntu 18.04 (LTS)
#cloud-config
# Upgrade the instance on first boot
# (ie run apt-get upgrade)
#
# Default: false
# Aliases: apt_upgrade
package_upgrade: true
# Install additional packages on first boot
@patrickbussmann
patrickbussmann / bootstrap_4_layout.html.twig
Created July 23, 2017 14:56
Bootstrap 4 layout for Symfony3
{% use "form_div_layout.html.twig" %}
{# Widgets #}
{% block form_widget_simple -%}
{% if type is not defined or type not in ['file', 'hidden'] %}
{%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-control')|trim}) -%}
{% endif %}
{{- parent() -}}
{%- endblock form_widget_simple %}
@patrickbussmann
patrickbussmann / ContentTypeExtensions.js
Last active February 28, 2016 02:47 — forked from vgrem/ContentTypeExtensions.cs
Creates a content type based on the specified schema in SharePoint 2010 (CSOM)
/**
* Creates a content type based on the specified schema (CSOM)
*/
var ContentTypeExtensions = new function () {
/**
* Creates a content type based on the specified schema.
* @param {Object} Client Context
* @param {Object} A Collaborative Application Markup Language (CAML) string that contains the schema.
* @return {Object} A newly created client object of a content type.
*/