Skip to content

Instantly share code, notes, and snippets.

@Potherca
Potherca / README.md
Last active August 26, 2024 13:39
BASH script to clone all git repository in a Group on GitLab, or Organization on GitHub.

Introduction

Starting at a new employer always mean checking out various git repositories.

As the amount of repositories a company has grows, the time needed to clone all of those repositories also grows.

This script automates this task.

In order for this script to work, a personal access token is needed.

@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("twitter.com") {
/* styles for collapsing media in tweets and showing an arrow to indicate their existence
but only at the top level */
ol.stream-items > .expanding-stream-item:not(.open) .OldMedia,
ol.stream-items > .expanding-stream-item:not(.open) .AdaptiveMedia {
display: none;
}
@bendc
bendc / functional-utils.js
Last active September 15, 2023 12:12
A set of pure ES2015 functions aimed to make functional JavaScript more idiomatic.
// array utils
// =================================================================================================
const combine = (...arrays) => [].concat(...arrays);
const compact = arr => arr.filter(Boolean);
const contains = (() => Array.prototype.includes
? (arr, value) => arr.includes(value)
: (arr, value) => arr.some(el => el === value)
@ericelliott
ericelliott / essential-javascript-links.md
Last active March 22, 2025 17:28
Essential JavaScript Links
@addyosmani
addyosmani / a_small_note.md
Last active October 16, 2021 04:40
clone.sh

This let's me git clone a template repo, cd into and fire up a new template in my editor of choice:

$ clone starter # clones https://github.com/addyosmani/starter (a personal boilerplate)

$ clone h5bp html5-boilerplate # get me HTML5 Boilerplate

$ clone angular angular-seed # same for AngularJS seed

$ clone polymerlabs seed-element # same for a new Polymer element
@sebmarkbage
sebmarkbage / ReactCanvasDrawing.js
Created July 25, 2014 19:14
Canvas Drawing Example
/** @jsx React.DOM */
var Graphic = React.createClass({
componentDidMount: function() {
var context = this.getDOMNode().getContext('2d');
this.paint(context);
},
componentDidUpdate: function() {
@WebReflection
WebReflection / handleEvent.md
Last active August 29, 2015 13:57
because handleEvent is the most powerful way to deal with DOM events or states (and not only DOM)

Update

This snippet is now improved and officially an npm module called dom-handler

Performance Hack - December 2013

Legacy of the hack

  • The majority of the hacks will be be made a reality
  • Pretty bad performance bug was found and fixed!
  • The Rashboard hack will help developer teams understand the real-time performance of the site
  • Everyone was excited about the potential of RUM data after James's talk
  • N&K data developers joined in and were keen to develop ideas useful to News
  • Great to see the unsurmountable stairs between floor 3/4 start to break down as everyone worked and chatted in the same space for 2 days
@Integralist
Integralist / node debug.md
Last active December 31, 2015 00:49
Node debugger API
Run your application using: `node debug xxx.js` then use the following commands to step-through the code (note: Ctrl+D to exit the debugger)...
 
    `cont`                      -> continue running
    `next`                      -> step over next statement
    `step`                      -> step into next statement (if possible, otherwise it just steps over)
    `out`                       -> step out of the currently executing function
    `backtrace`                 -> show the current call execution frame or call stack
    `repl`                      -> start the node repl to allow you to view variable values and execute code
    `watch(expr)`               -> add given expression to the watch list (which is shown whenever you step through anything in the debugger)