git add .
git add /path/to/file
git reset unstage all files
git reset /path/to/file unstage specific file
| 'use client'; | |
| import { useEffect, useRef, useState } from 'react'; | |
| export type UnicornSceneProps = { | |
| projectId: string; | |
| width?: number | string; | |
| height?: number | string; | |
| scale?: number; | |
| dpi?: number; |
| .sidebar { | |
| /* Select smaller of the 2 calculated values | |
| Narrower screens: 20vw, Wider screens: 300px */ | |
| width: min(20vw, 300px); | |
| } | |
| .make-the-logo-bigger { | |
| /* Select larger of the 2 calculated values | |
| Basically clamps the font size to 60px or larger (10vw) */ | |
| font-size: max(60px, 10vw); |
| :root { | |
| --ease-in-quad: cubic-bezier(0.55, 0.085, 0.68, 0.53); | |
| --ease-in-cubic: cubic-bezier(0.55, 0.055, 0.675, 0.19); | |
| --ease-in-quart: cubic-bezier(0.895, 0.03, 0.685, 0.22); | |
| --ease-in-quint: cubic-bezier(0.755, 0.05, 0.855, 0.06); | |
| --ease-in-expo: cubic-bezier(0.95, 0.05, 0.795, 0.035); | |
| --ease-in-circ: cubic-bezier(0.6, 0.04, 0.98, 0.335); | |
| --ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94); | |
| --ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1); | |
| --ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1); |
| let hasBlobConstructor = typeof(Blob) !== 'undefined' && (function () { | |
| try { | |
| return Boolean(new Blob()); | |
| } catch (e) { | |
| return false; | |
| } | |
| }()); | |
| let hasArrayBufferViewSupport = hasBlobConstructor && typeof(Uint8Array) !== 'undefined' && (function () { | |
| try { |
| var React = require('react'); | |
| var { Component, PropTypes } = React; | |
| var throttle = require('lodash/function/throttle'); | |
| class InfiniteScroll extends React.Component { | |
| static propTypes = { | |
| hasMore: PropTypes.bool.isRequired, | |
| isLoading: PropTypes.bool.isRequired, | |
| onLoadMore: PropTypes.func.isRequired, | |
| threshold: PropTypes.number, |
As explained on Don't Be Scared of git rebase, git fetch+rebase is a better alternative to git pull; unfortunately it's not as concise.
From now on, use git get instead of git pull, a custom command that does this:
# get data from remote
git fetch origin
# rebase the remote branch with the same name as local| 'use strict'; | |
| var gulp = require('gulp'); | |
| var gutil = require('gulp-util'); | |
| var del = require('del'); | |
| var uglify = require('gulp-uglify'); | |
| var gulpif = require('gulp-if'); | |
| var exec = require('child_process').exec; | |
| var notify = require('gulp-notify'); |
| var btn = document.getElementById("copy-button"); | |
| btn.addEventListener("click", clickHandler, false); | |
| btn.addEventListener("copy", copyHandler, false); | |
| function clickHandler(e) { | |
| e.target.dispatchEvent(new ClipboardEvent("copy")); | |
| } | |
| function copyHandler(e) { | |
| e.clipboardData.setData("text/plain", "Simulated copy. Yay!"); |
Create an empty git repo or reinitialize an existing one
git init