Skip to content

Instantly share code, notes, and snippets.

View nicolaisueper's full-sized avatar
🔲
moving rectangles around browser windows

Nicolai Süper nicolaisueper

🔲
moving rectangles around browser windows
View GitHub Profile
@nicolaisueper
nicolaisueper / index.js
Last active February 8, 2024 14:15
Download all GFDA-Wallpaper in 5K into current folder
const linkList = ["https://cdn.shopify.com/s/files/1/0201/8578/files/242-white_5120x2880.jpg?1742060675370373277","https://cdn.shopify.com/s/files/1/0201/8578/files/242-red_5120x2880.jpg?1742060675370373277","https://cdn.shopify.com/s/files/1/0201/8578/files/242-black_5120x2880.jpg?1742060675370373277","https://cdn.shopify.com/s/files/1/0201/8578/files/242-bob_5120x2880.jpg?1742060675370373277","https://cdn.shopify.com/s/files/1/0201/8578/files/189-white_5120x2880.jpg?1742060675370373277","https://cdn.shopify.com/s/files/1/0201/8578/files/189-red_5120x2880.jpg?1742060675370373277","https://cdn.shopify.com/s/files/1/0201/8578/files/189-black_5120x2880.jpg?1742060675370373277","https://cdn.shopify.com/s/files/1/0201/8578/files/189-bob_5120x2880.jpg?1742060675370373277","https://cdn.shopify.com/s/files/1/0201/8578/files/172-white_5120x2880.jpg?1742060675370373277","https://cdn.shopify.com/s/files/1/0201/8578/files/172-red_5120x2880.jpg?1742060675370373277","https://cdn.shopify.com/s/files/1/0201/8578/files/172-b
@nicolaisueper
nicolaisueper / ContentAPI.d.ts
Last active October 15, 2019 11:29
Ghost ContentAPI type definitions
import { Post } from "./Post";
import { Author } from "./Author";
import { Tag } from "./Tag";
import { Page } from "./Page";
import { Settings } from "./Settings";
interface ReadParams {
slug?: string;
id?: string;
}
@nicolaisueper
nicolaisueper / espruino-esp32-snake.js
Created August 24, 2018 16:30
ESP32 + Espruino + SSD1306 + 4 Push Buttons Snake
E.on("init", () => {
const SSD1306 = require("SSD1306");
const OLED_CLOCK_PIN = D22;
const OLED_DATA_PIN = D23;
const OLED_WIDTH = 128;
const OLED_HEIGHT = 64;
const LEFT = D12;
const RIGHT = D26;
const UP = D14;
@nicolaisueper
nicolaisueper / smoosh.js
Created March 19, 2018 14:24
smoosh and smooshMap JavaScript implementation
Array.prototype.smoosh = function () {
function smooshInternal(array) {
var smooshed = [];
for (var i = 0; i < array.length; i++) {
if (array[i] instanceof Array) {
smooshed.push.apply(smooshed, smooshInternal(array[i]));
} else {
smooshed.push(array[i]);
}
}
@nicolaisueper
nicolaisueper / howto.md
Last active June 9, 2017 10:48
Centralized Error Handling in Angular

Global error handling in Angular 2 / 4

Create ErrorHandler

// file: my-error-handler.ts

import { ErrorHandler, Injector, Injectable } from '@angular/core';
import { Response } from '@angular/http';
import { Router } from '@angular/router';