Skip to content

Instantly share code, notes, and snippets.

View Dottenpixel's full-sized avatar

dugg molidor Dottenpixel

View GitHub Profile
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active May 2, 2024 16:19
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@gaearon
gaearon / reducers.js
Last active December 11, 2020 14:56
How I'd do code splitting in Redux (pseudo code, not tested!)
import { combineReducers } from 'redux';
import users from './reducers/users';
import posts from './reducers/posts';
export default function createReducer(asyncReducers) {
return combineReducers({
users,
posts,
...asyncReducers
});
@jimbolla
jimbolla / protectFromUnmount.js
Created November 16, 2015 19:38
protectFromUnmount
function protectFromUnmount() {
let callbacks = {};
let count = 0;
const noop = value => value;
const wrapCallback = id => function(...params) {
const raceSafeCallbacks = callbacks;
if (!raceSafeCallbacks)
@maxim
maxim / gh-dl-release
Last active April 29, 2024 08:55
Download assets from private Github releases
#!/usr/bin/env bash
#
# gh-dl-release! It works!
#
# This script downloads an asset from latest or specific Github release of a
# private repo. Feel free to extract more of the variables into command line
# parameters.
#
# PREREQUISITES
#
@Dottenpixel
Dottenpixel / LICENSE
Last active August 29, 2015 14:27 — forked from ourmaninamsterdam/LICENSE
Arrayzing - The JavaScript array cheatsheet
The MIT License (MIT)
Copyright (c) 2015 Justin Perry
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
@wesbos
wesbos / gulpfile.js
Last active October 21, 2019 19:38
FAST Browserify + Reactify + Babelify
// Update: Hey Folks - I've got a full Gulpfile with everything else over at https://github.com/wesbos/React-For-Beginners-Starter-Files
var source = require('vinyl-source-stream');
var gulp = require('gulp');
var gutil = require('gulp-util');
var browserify = require('browserify');
var reactify = require('reactify');
var babelify = require('babelify');
var watchify = require('watchify');
var notify = require('gulp-notify');
@oshliaer
oshliaer / 70e04a67f1f5fd96a708.md
Last active August 5, 2023 09:22
Extract Gmail content to a spreadsheet #gas #gmail #sheet
gulp.task('strings', function() {
gulp.src('media/jade/*.jade')
.pipe(tap(function (file,t) {
var filename = path.basename(file.path);
return gulp.src(file.path)
.pipe(jade({
client: true,
name: filename
}))
@sebmarkbage
sebmarkbage / Enhance.js
Last active January 31, 2024 18:33
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@pascalduez
pascalduez / SassMeister-input.scss
Last active September 9, 2023 23:58
JavaScript `toString` and `parseInt` implementation in Sass.
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// ----
// JavaScript `toString` and `parseInt` implementation in Sass.
@function pow($num, $exp) {
$result: 1;