Skip to content

Instantly share code, notes, and snippets.

View himynameisdave's full-sized avatar
✌️
livin' the dream...

Dave Lunny himynameisdave

✌️
livin' the dream...
View GitHub Profile
@rikschennink
rikschennink / nudgeable.ts
Last active October 22, 2023 05:53
⌨️ A Svelte action to add arrow key interaction to an element
export default (element: HTMLElement, options: any = {}) => {
// if added as action on non focusable element you should add tabindex=0 attribute
const {
direction = undefined,
shiftMultiplier = 10,
bubbles = false,
stopKeydownPropagation = true,
} = options;
@mavvverick
mavvverick / labels.sh
Last active April 6, 2022 17:56
Add sane labels to GitHub Repo
USER={{user}} or {{organisation}}
TOKEN={{token}}
REPO={{repo}}
#Delete default labels
curl --user "$USER:$TOKEN" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/bug"
curl --user "$USER:$TOKEN" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/duplicate"
curl --user "$USER:$TOKEN" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/enhancement"
curl --user "$USER:$TOKEN" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/invalid"
curl --user "$USER:$TOKEN" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/question"
@maxparm
maxparm / pr-assessment.md
Last active October 18, 2016 18:37
Pull Request Assessment

Table to Predict Difficulty of a PR (yes = 1, no = 0)

  • Is it involving back-end and front-end? 1
  • Is it involving multiple models/apps? 1
  • Is a database schema change required? 1
  • How many ui screens are involved? N (as number of UI screens involved)
  • Is it involving changes on the mobile apps/extensions? N (as number of apps/extensions involved)
  • Is this a new feature? 1 (due to uncertainity)
  • Will a feature switch be used? 1
  • Does it involve old code (> 2 years old)? 1
  • Do we need to upgrade a library? 1
@himynameisdave
himynameisdave / readme.md
Last active November 9, 2015 19:40
Dead Simple Watch+Compile a Less File

Dead Simple Watch+Compile a Less File

Simply watches a Less file and compiles it on save.

Wat/Why?

Sometimes installing something like Gulp or Grunt is annoying if all you want to do is have a simple watch+compile going on. This includes PostCSS for the sake of Autoprefixer but you can obviously also add other PostCSS plugins to this script with ease.

Install Deps

@fieldoffice
fieldoffice / sass-transforms
Last active September 27, 2022 17:32
Sass Transform Mixins
// Browser Prefixes
@mixin transform($transforms) {
-webkit-transform: $transforms;
-moz-transform: $transforms;
-ms-transform: $transforms;
transform: $transforms;
}
// Rotate
@mixin rotate ($deg) {
// Clamps a block of text to a certain number of lines,
// followed by an ellipsis in Webkit and Blink based browsers
// Reference: http://dropshado.ws/post/1015351370/webkit-line-clamp
@mixin text-clamp($lines: 2, $line-height: false) {
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: $lines;
// Fallback for non-Webkit browsers