Skip to content

Instantly share code, notes, and snippets.

View alexanderbartels's full-sized avatar

Alexander Bartels alexanderbartels

View GitHub Profile
@alexanderbartels
alexanderbartels / config.json
Last active October 5, 2020 14:55
Angular Recipe for a configuration service that caches the result and works with rxjs
{
"toggles": {
"foo": "bar"
},
"availableLanguages": ["de", "en", "jp"]
}
@alexanderbartels
alexanderbartels / tailwind.js
Last active June 23, 2018 16:16
Open Color configuration for tailwindcss. Color Preview: https://yeun.github.io/open-color/
/*
|-------------------------------------------------------------------------------
| Colors https://tailwindcss.com/docs/colors
|-------------------------------------------------------------------------------
|
| Here you can specify the colors used in your project. To get you started,
| we've provided a generous palette of great looking colors that are perfect
| for prototyping, but don't hesitate to change them for your project. You
| own these colors, nothing will break if you change everything about them.
|
@alexanderbartels
alexanderbartels / download_nodejs.sh
Created November 29, 2017 13:03
wget script to download all packages from a specific NodeJS Version. Useful if you work with the maven-frontend-plugin
#!/bin/sh
### # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ###
### Script to download all available NodeJS Packages for all plattforms ###
### # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ###
# Which Node version should be downloaded?
NODE_VERSION="v8.9.1"
@alexanderbartels
alexanderbartels / web.xml
Last active September 24, 2015 16:11
web.xml to with mime type for web fonts
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Web-Fonts</display-name>
<!-- web fonts -->
<mime-mapping>
<extension>eot</extension>
<mime-type>application/vnd.ms-fontobject</mime-type>
</mime-mapping>
<mime-mapping>
@alexanderbartels
alexanderbartels / web.xml
Created September 24, 2015 16:06
web.xml to with mime type for web fonts
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Web-Fonts</display-name>
<!-- web fonts -->
<mime-mapping>
<extension>eot</extension>
<mime-type>application/vnd.ms-fontobject</mime-type>
</mime-mapping>
<mime-mapping>
@alexanderbartels
alexanderbartels / foundation.offcanvas.html
Last active March 11, 2023 11:00
CSS to show the offcanvas menu only on mobile and tablet. On Large Screens is the menu always visible
<div class="off-canvas-wrap" data-offcanvas>
<div class="inner-wrap">
<nav class="tab-bar">
<section class="left-small">
<a class="left-off-canvas-toggle menu-icon" href="#"><span></span></a>
</section>
<section class="middle tab-bar-section">
<h1 class="title">Offcanvas example</h1>
</section>
@alexanderbartels
alexanderbartels / MyUtil.java
Created September 30, 2014 06:50
How to protect a static util class from instantiation in Java
public final class MyUtil {
private static final String MY_CONST = "HalloWelt";
private MyUtil() {
throw new AssertionError("Suppress default constructor for non instantiability");
}
public static int foo() {
return -1;
@alexanderbartels
alexanderbartels / jquery-ui-v.1.8.js
Last active August 29, 2015 14:05
overview of extending jQuery UI widgets in 1.8
(function($, _super){
$.widget('bartels.myDialog', $.ui.dialog, {
options: {
someKey: undefined
},
_create: function () {
_super._create.call(this);
this.updateSomeKey(this.options.someKey);