Skip to content

Instantly share code, notes, and snippets.

View piecioshka's full-sized avatar
🎺
Best music for coding is a classic trumpet

Piotr Kowalski piecioshka

🎺
Best music for coding is a classic trumpet
View GitHub Profile
@marshallvaughn
marshallvaughn / cheatsheet.fish
Last active May 17, 2023 06:48
Fish cheatsheet
# Get only the name of the current directory
basename $PWD
# ~
# Set an array var
set _shows 'The Office' 'It\'s Always Sunny in Philadelphia'
# For loop
for _show in $_shows
echo "I love $_show!"
@iamandrewluca
iamandrewluca / request-picture-in-picture.js
Last active April 25, 2024 13:46
Request picture in picture on first found video that is playing #bookmarklet
javascript: void ((function() {
/* More bookmarklets at https://gist.github.com/iamandrewluca/61feacf07bc4f2f50e70f986c2e9b2d2 */
/** @type {NodeListOf<HTMLIFrameElement>} */
const iFrames = window.document.querySelectorAll('iframe');
console.log(`Found ${iFrames.length} iframes`);
/** @type {Document[]} */
const allDocuments = [
window.document,
@aeschright
aeschright / npm-strike.md
Last active September 8, 2021 16:32
A note about npm cli work status

When will npm@6.9.1 be released (and other PRs merged?)

On March 22, npm fired several members of the open source and community team for discussing workplace conditions and other labor organizing activities. As a result, core employee contributors to the npm cli were removed from the project, and others have left in solidarity or put their work on hold.

Multiple claims were filed with the NLRB on this matter. The NLRB has investigated and found sufficient evidence of validity to proceed. The National Labor Relations Act of 1935 protects US employees' right to engage in discussions of workplace concerns without threat of retaliation -- and awareness of the importance of how we treat each other is something I valued so much in collaborating with the cli team. How can we work together if we aren't free to discuss what we need?

It's disappointing for all of us to find the work we were doing interrup

@archiewald
archiewald / pre-push.sh
Last active March 26, 2019 20:20
[warn pushing to protected branches] #git
!/bin/bash
protected_branches=('master' 'develop')
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
is_branch_protected=false;
for protected_branch in "${protected_branches[@]}"
do
if [ $protected_branch = $current_branch ]
then
#!/usr/bin/env bash
cd ./tests
for i in $(ls -d */);
do
cd ${i};
echo "------------------------------------------"
echo "Testing " ${i}
echo "------------------------------------------"
import PropTypes from 'prop-types';
type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
type Defined<T> = T extends undefined ? never : T;
/**
* Get the type that represents the props with the defaultProps included.
*
* Alternatively, we could have done something like this:
@DavidKuennen
DavidKuennen / minimal-analytics-snippet.js
Last active May 3, 2024 12:55
Minimal Analytics Snippet
(function (context, trackingId, options) {
const history = context.history;
const doc = document;
const nav = navigator || {};
const storage = localStorage;
const encode = encodeURIComponent;
const pushState = history.pushState;
const typeException = 'exception';
const generateId = () => Math.random().toString(36);
const getId = () => {
@rsp
rsp / how-to-create-a-pull-request.md
Last active May 8, 2024 12:48
How to create a Pull Request on GitHub

How to create a Pull Request on GitHub

1. Fork the repository:

![Fork the repo][fork-repo]

2. Select user or organization to fork as:

(if you belong to one or more organizations with appropriate permissions)

I bundled these up into groups and wrote some thoughts about why I ask them!

If these helped you, I'd love to hear about it!! I'm on twitter @vcarl_ or send me an email carl.vitullo@gmail.com

Onboarding and the workplace

https://blog.vcarl.com/interview-questions-onboarding-workplace/

  • How long will it take to deploy my first change? To become productive? To understand the codebase?
  • What kind of equipment will I be provided? Will the company pay/reimburse me if I want something specific?
@rsp
rsp / GitHub-Project-Guidelines.md
Last active November 15, 2023 03:50
Git Strict Flow and GitHub Project Guidelines - setup rules and git flow for commercial and open-source projects by @rsp

Git Strict Flow and GitHub Project Guidelines

Or how to turn this:

into this: