Skip to content

Instantly share code, notes, and snippets.

@meleu
meleu / manage-dotfiles.md
Created April 11, 2022 18:02
Smarttest way to manage dotfiles

smarttest way to manage your dotfiles with git

disclaimer

I'm assuming you have knowledge about git.

starting a dotfiles repo

@LeZuse
LeZuse / howto.md
Last active July 5, 2023 07:52
Disable Docker for Mac auto-update

Docker downloads all updates into a directory in /Users/$USER/Library/Caches/com.docker.docker/org.sparkle-project.Sparkle Let's make this directory inaccessible to the user under which Docker is going to run (you).

Switch to root user:

  sudo su

Change directory ownership and prevent access to other users:

gif-from-tweet

There are so many great GIFs out there and I want to have copies of them. Twitter makes that harder than it should be by converting them to MP4 and not providing access to the source material. To make it easier, I made a bash pipeline that takes a tweet URL and a filename, extracts the MP4 from that tweet and uses ffmpeg to convert back to GIF.

Dependencies

  • ffmpeg
    • macOS: brew install ffmpeg
    • Ubuntu/Debian: apt install ffmpeg
@JakeSidSmith
JakeSidSmith / brighton-and-hove-meetups.md
Last active March 29, 2018 16:36
List of Brighton & Hove Design, Development, and Various Other Tech / Nerdy Meetups

ANNOUNCEMENT: We've moved all of these meetups to a better maintained website called Brighton Brains - add it to your bookmarks, share it on your social media, etc. :D

Brighton & Hove Design, Development, and Related Meetups

Development

A JavaScript meetup for Brighton & Hove

@ManasJayanth
ManasJayanth / canvas-immediate.js
Created April 19, 2017 05:50
Canvas Immediate mode rendering using React
import type { HostConfig, Reconciler } from 'react-fiber-types';
import type { ReactNodeList } from 'react-fiber-types/ReactTypes';
import DOMPropertyOperations from './DOMPropertyOperations';
import type {
Props,
Container,
Instance,
TextInstance,
OpaqueHandle,
@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@sheedy
sheedy / style-guides.md
Last active December 25, 2015 11:09
A list of "living" Style Guides

Style Guides

Add any links you want in this to the comments and I'll add them.

Grunt/JS/Handlebars

Generates styleguides from Markdown comments in CSS, SASS and LESS files using Handlebars

Node/JS

@desandro
desandro / add-event.js
Created November 15, 2012 03:04
add/remove event with handleEvent helper
// modified John Resig's http://ejohn.org/projects/flexible-javascript-events/
var div = document.createElement('div');
var addEvent, removeEvent;
if ( div.addEventListener ) {
addEvent = function( elem, type, fn ) {
elem.addEventListener( type, fn, false );
};
@naholyr
naholyr / function-argnames.js
Created February 19, 2012 18:30
JS Introspection: extract function parameter names
Function.prototype.argNames = function () {
// Extract function string representation: hopefully we can count on it ?
var s = this.toString();
// The cool thing is: this can only be a syntactically valid function declaration
s = s // "function name (a, b, c) { body }"
.substring( // "a, b, c"
s.indexOf('(')+1, // ----------------^
s.indexOf(')') // ------^
);
@paulirish
paulirish / rAF.js
Last active March 22, 2024 00:00
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];