Skip to content

Instantly share code, notes, and snippets.

@jayphelps
jayphelps / package.json
Last active March 20, 2024 09:41
TypeScript output es2015, esm (ES Modules), CJS, UMD, UMD + Min + Gzip. Assumes you install typescript (tsc), rollup, uglifyjs either globally or included as devDependencies
{
"scripts": {
"build": "npm run build:es2015 && npm run build:esm && npm run build:cjs && npm run build:umd && npm run build:umd:min",
"build:es2015": "tsc --module es2015 --target es2015 --outDir dist/es2015",
"build:esm": "tsc --module es2015 --target es5 --outDir dist/esm",
"build:cjs": "tsc --module commonjs --target es5 --outDir dist/cjs",
"build:umd": "rollup dist/esm/index.js --format umd --name YourLibrary --sourceMap --output dist/umd/yourlibrary.js",
"build:umd:min": "cd dist/umd && uglifyjs --compress --mangle --source-map --screw-ie8 --comments --o yourlibrary.min.js -- yourlibrary.js && gzip yourlibrary.min.js -c > yourlibrary.min.js.gz",
}
}
@ALF-er
ALF-er / ReactConf2017.md
Last active June 19, 2021 20:09
My review of speeches at React Conf 2017

Disclaimer: Многие доклады смотрелись и отчёты писались в поезде, спать хотелось капец.

Disclaimer 2: Если что, простите за орфорграфию.

Вступление, в основном - нудное бла, бла, бла. Из достижений - 547,138 ReactDevTools installed on Chrome. Тем кто териториально недалеко от San Francisco Bay Area может быть интересно, что FB проводит открытые митапы - ReactWednesday.

Докладчик харизматичный, слушать его приятно.

@listochkin
listochkin / yaroslavskiy-sort.java
Created March 29, 2016 10:40
Yaroslavsky Sort: 2-pivot quicksort + Insertion sort for smaller chunks
// See original announcement at http://permalink.gmane.org/gmane.comp.java.openjdk.core-libs.devel/2628
/**
* <at> author Vladimir Yaroslavskiy
* <at> version 2009.09.10 m765
*/
public class DualPivotQuicksort {
public static void sort(int[] a) {
sort(a, 0, a.length);
@brandondurham
brandondurham / styles.less
Last active January 11, 2024 06:46
Using Operator Mono in Atom
/**
* Using Operator Mono in Atom
*
* 1. Open up Atom Preferences.
* 2. Click the “Open Config Folder” button.
* 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up.
* 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden!
* 5. Tweak away.
*
* Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png):
@c01nd01r
c01nd01r / gulpfile.js
Last active December 22, 2015 18:17
Gulp build error to browser
//npm i gulp gulp-stylus gulp-plumber browser-sync bs-fullscreen-message
var gulp = require('gulp');
var stylus = require('gulp-stylus');
var plumber = require('gulp-plumber');
var browserSync = require('browser-sync').create();
//Enable "Fullscreen Messages" plugin in Browsersync Plugins web settings (http://localhost:3001/plugins)
//Notification template
var bsError = function(data) {
@akella
akella / break-word.sass
Last active July 25, 2017 04:33
Breaking long words
=force-new-lines-for-long-words
-ms-word-break: break-all
word-break: break-all
word-break: break-word
-webkit-hyphens: auto
-moz-hyphens: auto
hyphens: auto
@Dr-Nikson
Dr-Nikson / README.md
Last active June 8, 2023 12:04
Auth example (react + redux + react-router)
" Before using this configuration follow the instruction below
"
" Check the requirements for plugins:
" * highlight (brew) required for preview FZF
" * livedown (npm) required for vim-livedown
" * standard (npm) required for syntastic check of javascript
" * tslint (npm) required for syntastic check of typescript
" * typescript (npm) required for Quramy/tsuquyomi
"
" Create folders for storing temporary files