Skip to content

Instantly share code, notes, and snippets.

View josefaidt's full-sized avatar
🦉

josef josefaidt

🦉
View GitHub Profile
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 7, 2024 07:28
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@awidegreen
awidegreen / vim_cheatsheet.md
Last active June 17, 2024 03:41
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@robertkowalski
robertkowalski / npm-registry-licenses.txt
Created November 23, 2013 22:31
The licenses in the npm-registry from their package.json, from the latest version of each module 23.11.2013
The licenses in the npm-registry from their package.json, from the latest version of each module
23.11.2013
[ { key: 'undefined', value: 27785 },
{ key: 'MIT', value: 20811 },
{ key: 'BSD', value: 5240 },
{ key: 'BSD-2-Clause', value: 621 },
{ key: 'Apache 2.0', value: 263 },
{ key: 'GPL', value: 233 },
@DavidWells
DavidWells / reset.css
Last active June 25, 2024 18:15 — forked from karbassi/reset.css
CSS reset. Follow me on the twitters for more tips: https://twitter.com/davidwells
/* http://meyerweb.com/eric/tools/css/reset/
v2.0-modified | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,

Aligning images

This is a guide for aligning images.

See the full Advanced Markdown doc for more tips and tricks

left alignment

This is an example with a simple TODO schema:
```graphql
type Todo @model {
id: ID!
name: String!
description: String
}
```
@evankirkiles
evankirkiles / override.ts
Created March 7, 2022 06:09
Cognito User Pool Auth for AWS Amplify Function CFN Override
// This file is used to override the REST API resources configuration
import { AmplifyApiRestResourceStackTemplate } from "@aws-amplify/cli-extensibility-helper";
export function override(resources: AmplifyApiRestResourceStackTemplate) {
// Add our user pool id as a parameter so we can create authorizers with it
// Note that you have to replace <your auth name here> with the name of your auth!
// It's the name of the folder in amplify/backend/auth that was created when you
// added the auth to the project (NOT userPoolGroups). Also make sure you keep
// the preceding "auth" part of the string before the auth name, it's necessary.
resources.addCfnParameter(
@brandonmcconnell
brandonmcconnell / getTimeSince.js
Last active July 26, 2022 04:11
getTimeSince - function for getting a human-readable value of the time since/between datetimes
const ordinalizeNumber = n => {
const rule = new Intl.PluralRules('en-US', { type: 'ordinal' }).select(n);
const suffix = ({
one: 'st',
two: 'nd',
few: 'rd',
other: 'th',
})[rule];
return `${n}${suffix}`;
}
@ixahmedxi
ixahmedxi / tsup.config.ts
Created December 2, 2023 13:38
tsup multi entrypoint
import fs from 'fs';
import path from 'path';
import { defineConfig } from 'tsup';
// INFO: This is the only place you need to update when adding new entry folders
const entryFolders = ['primitives', 'ui'];
function getAllFilesInDirectory(dirPath: string): string[] {
return fs.readdirSync(dirPath).reduce<string[]>((allFiles, file) => {