Skip to content

Instantly share code, notes, and snippets.

View danbruegge's full-sized avatar

Daniel Brüggemann danbruegge

View GitHub Profile
@danbruegge
danbruegge / run-cypress-test-till-it-fails.sh
Created October 17, 2022 17:28
Run cypress test till it fails.
#!/bin/sh
NOW=$(date +"%Y-%m-%d-%H-%M-%S")
COMMAND='pnpm cypress run --spec file.spec.js';
OUTPUT_PATH="output/${NOW}";
OUTPUT_FILENAME="${OUTPUT_PATH}/ run";
RUN_COUNTER=1;
RUN_LOOP=true;
beep() {
[DEBUG][2022-05-24 19:55:51] .../lua/vim/lsp.lua:1095 "LSP[tsserver]" "client.request" 1 "textDocument/definition" {
position = {
character = 64,
line = 12
},
textDocument = {
uri = "file:///home/dan/workspace/.../camera-event-group-filter.js"
}
} <function 1> 13
[DEBUG][2022-05-24 19:55:51] .../vim/lsp/rpc.lua:355 "rpc.send" {
require("packer_compiled")
require("packer").startup({
function(use)
use("lewis6991/impatient.nvim")
-- package management
use("wbthomason/packer.nvim")
-- colorscheme
@danbruegge
danbruegge / README.md
Last active December 2, 2018 12:20
Simply manage your markdown notes in bash.

Usage

  • add this script to your .bashrc
  • adjust
    • $NOTES_HOME path to your preferred location of the notes
  • $NOTES_EDITOR to your preferred editor in which the notes should be edited
@danbruegge
danbruegge / PreloadImages.jsx
Created August 1, 2018 19:42
PreloadImages.jsx
import React from 'react';
import PropTypes from 'prop-types';
const PreloadImages = ({ urls }) => urls.map(url => (
<span key={url} style={{ backgroundImage: `url(${url})` }} />
));
PreloadImages.propTypes = {
urls: PropTypes.arrayOf(PropTypes.string).isRequired,
};
@danbruegge
danbruegge / Button.jsx
Last active December 8, 2017 11:41
Button.jsx
import Button from 'app/components/Form/Button';
export default Button.extend`
border-radius: 8rem;
font-family: 'Fira Sans', sans-serif;
font-size: 1rem;
line-height: 1;
text-transform: none;
${styleOnInfo}
${styleOnHighlight}
@danbruegge
danbruegge / toggleFooter.new.js
Last active March 18, 2017 16:29
Before and after clean up
import jQuery from 'jquery';
let tempHeight = '';
export default function footerInit () {
jQuery('#FooterSwitch').on('click', toogle);
}
function toogle () {
const $footer = jQuery('#Footer');
:root{--bgColor:#fff;--textColor:#333;--brandColor:#ac3;--headerFontFamily:"Julius Sans One",sans-serif}body{background-color:var(--bgColor);color:var(--textColor);font-size:2.5em}.container{padding:0 1em}h1,h2{font-family:var(--headerFontFamily)}h1{color:var(--brandColor)}[type=checkbox]{height:1em;margin:0 .5em .3em;vertical-align:middle;width:1em}
import React from 'react';
import { View } from 'react-native';
import PinGroupItem from './groupItem';
import PinDetail from './detail';
import { Tiles, Tile, H3, } from '../../components';
import { pins } from '../../helper';
export default class PinGroup extends React.Component {
constructor (props) {
@danbruegge
danbruegge / twitter-background.css
Created July 22, 2015 07:38
Add custom background-color for twitter. Paste the code into a new Stylisch style. (https://addons.mozilla.org/en-US/firefox/addon/stylish/)
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("twitter.com") {
body {
background-color: #111;
}
}