Skip to content

Instantly share code, notes, and snippets.

View dschu-lab's full-sized avatar
🏠
Working from home

Julian Anthes dschu-lab

🏠
Working from home
View GitHub Profile
@dschu-lab
dschu-lab / .bashrc
Created May 24, 2017 14:20
Tiny wrapper for cheat.sh 🚀
function cheat { curl cheat.sh/"$1"; }
function cheat-find { curl cheat.sh/~"$1"; }
export -f cheat
export -f cheat-find
@dschu-lab
dschu-lab / unblock-spiegel.js
Last active November 17, 2017 11:56
Unblock SPIEGEL ONLINE
/*
* Since SPIEGEL ONLINE is still showing the popup, even when adblockers are disabled, I created a small workaround
*
* Usage:
* Create a new bookmark and copy/paste the snippet below.
* Once the popup/modal occurs, open the bookmark to permanently hide the popup until you refresh the page or navigate
*/
javascript:$('.ua-detected.ua-webkit').hide();$('#wrapper-content').attr('style', '');
@dschu-lab
dschu-lab / BlurredCircularButton.swift
Last active August 23, 2022 13:12
Simple UIButton subclass for having buttons with vibrancy effect that work in code as well as in story board
//
// BlurredCircularButton.swift
//
import UIKit
class BlurredCircularButton: UIButton {
private func addBlurSubviews() {
self.backgroundColor = nil
@dschu-lab
dschu-lab / .bash_profile
Created October 30, 2018 13:04
📱⚡️ Quickly open iOS Simulator from command line using `simulator` alias
# iPhone Simulator
alias simulator='open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app'
@dschu-lab
dschu-lab / filter.md
Last active January 16, 2019 16:03
[JIRA] Advanced Filter: Mentioned in the last 30 days

What is this?

JIRA does not show you tickets, where you were mentioned, but not assigned. You may get an email, but email notificatins are distracting and some people, including me, don't like to get them at all. Thanks to this snippet, you'll never miss a ticket, where you were mentioned, but not assigned. 😁👌

Usage

Navigate to JIRA's search, then add a new filter and apply the snippet below. Save your newly created, advanced search filter. Head back to the dashboard, press the add new gadget, choose Filter Results from JIRA's gadgets and select your filter.

Snippet

@dschu-lab
dschu-lab / ArrowButton.spec.tsx
Created January 28, 2025 07:10
A Vitest mocking `@tanstack/react-router` adding a returnValue to useRouter() hook
import { useRouter } from "@tanstack/react-router";
import { render, screen } from "@testing-library/react";
import { Mock } from "vitest";
import { ArrowLink } from "./ArrowLink";
import '@testing-library/jest-dom'
vi.mock(import("@tanstack/react-router"), async (importOriginal) => {
const actual = await importOriginal();
return {
...actual,