Skip to content

Instantly share code, notes, and snippets.

View ddanninger's full-sized avatar

Dominik Danninger ddanninger

View GitHub Profile
@Konafets
Konafets / .gitlab-ci.yml
Last active October 5, 2019 19:08
Sylius GitLab CI
stages:
- test
variables:
MYSQL_DATABASE: sylius_test_cached
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: root
# This is normally provided by the .env file. But since we have to use "mysql" as host name, its defined
# here. We not using any .env file!
# The pattern is: mysql://user:password@host/database
@jambelnet
jambelnet / ASP.NET Core Identity script for MySql
Created July 7, 2018 12:19
ASP.NET Core Identity script for MySql
--
-- MySql - ASP.NET Core Identity
--
--
-- Table structure for table `aspnetroles`
--
CREATE TABLE IF NOT EXISTS AspNetRoles (
`Id` varchar(128) NOT NULL,
@bampakoa
bampakoa / app-component.spec.ts
Last active September 30, 2020 07:19
Mock ipcRenderer with ngx-electron using RxJS Observables
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ElectronService } from 'ngx-electron';
import { AppComponent } from './app.component';
import { FakeElectronService } from './fake-electron.service';
describe('AppComponent', () => {
let fixture: ComponentFixture<AppComponent>;
let comp: AppComponent;
let electronService: FakeElectronService;
@lukasvan3l
lukasvan3l / rendercard.js
Created April 17, 2017 06:33
Fabric.js + Opentype.js for pixelperfect valentine cards
const canvas = fabric.createCanvasForNode(width, height);
canvas.contextCache.constructor.prototype.getFontSize = function getFontSize() {
return 1 * this.font.split('-')[1];
};
canvas.contextCache.constructor.prototype.getFontFamily = function getFontFamily() {
return this.font.split('-')[0]
};
@lehni
lehni / index.html
Last active December 25, 2023 10:49
Paper.js Bézier Offsetting
<!DOCTYPE html>
<html>
<head>
<!--
Copyright (c) 2014-2017, Jan Bösenberg & Jürg Lehni
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@cliffhall
cliffhall / a-render-and-transmit-test.md
Last active February 1, 2024 16:26
A Three.js / Socket.io / Node.js render and transmit test.

This example renders thirty frames of the Three.js 'your first scene' example and sends them to a Node.js microservice, which saves them to the filesystem.

test-render-client.html

  • Creates the scene, camera, renderer, and kicks off the render loop, which stops after 30 frames have been rendered.
  • As an optimization, it doesn't add the Three.js canvas to the browser DOM, rendering it offscreen, but reporting progress.
  • It extracts the data for each frame using canvas.toDataURL(), sending that to a web worker process for transmission.
  • When all frames are rendered, it sends a 'done' message to the worker.

test-render-worker.js

  • Sets up a queue for incoming frames to be sent to the server.
@DirkWolke
DirkWolke / searchbox.html
Created October 14, 2016 12:34
#TYPO3 #FLUID searchbox-form for #indexed_search
<f:form class="searchbox form-inline"
pageUid="{pidSearch}"
method="post"
noCacheHash="true"
absolute="0"
action="search"
extensionName="IndexedSearch"
pluginName="pi2"
controller="Search"
>
@robinbastien
robinbastien / main.js
Last active January 23, 2018 10:13
CSS Scroll Reveals (Simple WOW.js alternative)
// Get height of window and set an offset from bottom
var winHeight = $(window).height();
var offset = 50;
// Recalc height of window in case of resize
$(window).bind('resizeEnd', function() {
winHeight = $(window).height();
});
// When we scroll we do some checks...
@robhemsley
robhemsley / Inkscape_install.sh
Created March 2, 2016 19:06
AWS Linux AMI - Inkscape Install
#!/bin/bash
set -e
#####################
# Inkscape Install #
#####################
# Script installs Inkscape from source for Amazon AMI Instance (CentOS/REHL)
#
# Works as of 01/03/2016