Skip to content

Instantly share code, notes, and snippets.

Out sick

Christopher Dosin ChristopherDosin

Out sick
Block or report user

Report or block ChristopherDosin

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 form.twig
<form class="profile-form" method="post" accept-charset="UTF-8" enctype="multipart/form-data">
{{ actionInput('users/save-user') }}
{{ csrfInput() }}
{{ hiddenInput('userId', }}
<div class="grid-x grid-margin-x">
<div class="cell small-12 large-6">
<label for="qJobTitle">
<input type="hidden" name="fields[qualification][new1][type]" value="position">
<input type="text" name="fields[qualification][new1][fields][position]" value="Deine Position ..." required>
View submit.twig
<form method="post" accept-charset="UTF-8">
{{ csrfInput() }}
{{ actionInput('entries/save-entry') }}
{{ hiddenInput('sectionId', '2') }}
{{ hiddenInput('enabled', '1') }}
<div class="margin-bottom-1" style="margin-bottom: 20px;">
<input type="text" name="title" placeholder="Titel des Artikels..." {%- if entry is defined %} value="{{ entry.title }}" {% endif -%} required>
{% if entry is defined %}
ChristopherDosin / jquery.sticky-element.js
Created Jan 3, 2019
Shopware jQuery sticky element
View jquery.sticky-element.js
* Sticky plugin to add a class based on the
* scroll position.
$.plugin('swStickyElement', {
defaults: {
* The css class for the sticky element.
* @property stickyCls
View promise-take-at-least.js
// Creates a new promise that automatically resolves after some timeout:
Promise.delay = function (time) {
return new Promise((resolve, reject) => {
setTimeout(resolve, time)
// Throttle this promise to resolve no faster than the specified time:
Promise.prototype.takeAtLeast = function (time) {
return new Promise((resolve, reject) => {
ChristopherDosin /
Created Jul 17, 2018
Simple script to install Cloud9 on an Ubuntu Server
# Simple script to install Cloud9 on an Ubuntu Server
apt-get update && apt-get install build-essential -y
apt-get install git -y
apt-get install nodejs -y
apt-get install npm -y
apt-get install python2.7 python-pip -y
# cd ~/to/your/directory
View ajaxform.js
$('#id-form button[type=submit]').click(function(e){
$(this).text('Einen moment...');
var form = jQuery(this).parents("form:first");
var dataString = form.serialize();
var formAction = form.attr('action');
View gist:0da262095d45806dac383560007ccfbe
"ace": {
"custom-types": {
"json()": {
"tpl": "smarty"
ChristopherDosin / array.pug
Created Jan 25, 2018
Bilder ausgeben aus Array
View array.pug
each season in seasons
input(type="radio" name="slide")
-var seasonPic = season["picture"]
div(style="background-image: url(" + seasonPic["src"]+")")
.accslide(style="background-color: " + season["backgroundColor"])
ChristopherDosin / php_object_to_array.php
Created May 3, 2017 — forked from victorbstan/php_object_to_array.php
recursively cast a PHP object to array
View php_object_to_array.php
This function saved my life.
found on:
by: crvandyke
It takes an object, and when all else if/else/recursive functions fail to convert the object into an associative array, this one goes for the kill. Who would'a thunk it?!
$array = json_decode(json_encode($object), true);
You can’t perform that action at this time.