Skip to content

Instantly share code, notes, and snippets.

View fi3ework's full-sized avatar
😮‍💨
recovering from burn out

fi3ework

😮‍💨
recovering from burn out
View GitHub Profile
@myitcv
myitcv / 01_ReactTeamProposal.ts
Last active September 18, 2019 15:32
Typescript example comparing various signatures for getDerivedStateFromProps
interface MyCompProps {
model: Model;
modParams: ModParams;
}
interface MyCompState {
derived1?: Derived1;
derived2?: Derived2;
initialized: boolean;
@wanglf
wanglf / vscode-extension-offline.md
Last active May 3, 2024 06:06
Download VS Code extensions as VSIX

How to use?

  • Copy content of vsix-bookmarklet, create a bookmark in your browser.
  • Navigate to the web page of the VS Code extension you want to install.
  • Click the bookmark you just created, then click the download button.
    download
  • After download finished, rename the file extension to *.vsix.
  • In VS Code, select Install from VSIX... in the extension context menu.
    vsc
@dalegaspi
dalegaspi / brew_symlink_error_sierra.md
Last active January 4, 2024 22:32
Homebrew Symlink errors in Mac OSX High Sierra
@rodkranz
rodkranz / GoConfigPrivateRepository.md
Last active July 27, 2022 13:15
Go Get from private repository

I had a problem with go get using private repository on gitlab from our company. I lost a few minutes trying to find a solution.... and I did find one:

  1. You need to get a private token at:

    https://gitlab.mycompany.com/profile/account

  2. Configure you git to add extra header with your private token:

$ git config --global http.extraheader "PRIVATE-TOKEN: YOUR_PRIVATE_TOKEN"

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 7, 2024 15:39
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@xtuc
xtuc / Babel.md
Last active April 17, 2019 04:43

Path

remove

Removes the current path.

Example

Visistor:

@carl0zen
carl0zen / styled-components-mixin-example.jsx
Last active December 8, 2021 05:51
Styled Components Mixin example
// Mixin like functionality
const textInput = props => `
color: ${props.error ? color.white : color.base};
background-color: ${props.error ? color.alert : color.white};
`;
export const Input = styled.input`
${textInput}
`;
@ayamflow
ayamflow / gist:b602ab436ac9f05660d9c15190f4fd7b
Created May 9, 2016 19:10
Safari border-radius + overflow: hidden + CSS transform fix
// Add on element with overflow
-webkit-mask-image: -webkit-radial-gradient(white, black);
@tonysneed
tonysneed / Mac OS X: Open in Visual Studio Code
Last active March 27, 2024 10:02
Add a command to Finder services in Mac OSX to open a folder in VS Code
- Open Automator
- File -> New -> Service
- Change "Service Receives" to "files or folders" in "Finder"
- Add a "Run Shell Script" action
- Change "Pass input" to "as arguments"
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*"
- Save it as something like "Open in Visual Studio Code"
@ilfroloff
ilfroloff / ClassA.js
Last active March 4, 2024 09:01
JavaScript Singleton using class
'use strict';
import Singleton from 'Singleton';
class ClassA extends Singleton {
constructor() {
super();
}
singletonMethod1() {
// ...