Skip to content

Instantly share code, notes, and snippets.

View frndmg's full-sized avatar

Fernando Martínez González frndmg

View GitHub Profile
@shilman
shilman / storybook-docs-typescript-walkthrough.md
Last active February 20, 2024 11:37
Storybook Docs Typescript Walkthrough

Storybook Docs w/ CRA & TypeScript

This is a quick-and-dirty walkthrough to set up a fresh project with Storybook Docs, Create React App, and TypeScript. If you're looking for a tutorial, please see Design Systems for Developers, which goes into much more depth but does not use Typescript.

The purpose of this walkthrough is a streamlined Typescript / Docs setup that works out of the box, since there are countless permutations and variables which can influence docs features, such as source code display, docgen, and props tables.

Step 1: Initialize CRA w/ TS

npx create-react-app cra-ts --template typescript
@rufoa
rufoa / Jenkinsfile
Created May 13, 2019 02:29
Jenkins [skip ci] implementation for multi-branch declarative pipeline
// change 'agent' lines as appropriate
pipeline {
agent none
stages {
stage('Run CI?') {
agent any
steps {
@nilox94
nilox94 / matrix.sh
Last active August 10, 2023 19:16
Executes `openvpn` with some known `.ovpn` files and prepares a route for your local network while `openvpn` is running
#!/bin/bash
################################################################################
# Matrix
# ======
#
# `Matrix` executes `openvpn` with some known `.ovpn` files located in a given
# directory and sends a notification via `notify-osd` when vpn connection drops
#
################################################################################
@fabianvf
fabianvf / composable.py
Last active May 20, 2020 15:21
Python function composition with a dot operator
class Composable(object):
''' A function decorator that allows you to use Haskell style dot notation for function composition '''
fns = {}
def __init__(self, fn):
self.fn = fn
Composable.fns[fn.__name__] = fn
def __call__(self, *args, **kwargs):
''' simply calls the function '''
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active April 30, 2024 23:36
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@rxaviers
rxaviers / gist:7360908
Last active May 4, 2024 22:00
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@m14t
m14t / fix_github_https_repo.sh
Created July 5, 2012 21:57
Convert HTTPS github clones to use SSH
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
fi