Skip to content

Instantly share code, notes, and snippets.

@madrobby
madrobby / LICENSE.txt
Created May 19, 2011 12:44 — forked from 140bytes/LICENSE.txt
Functional array sorting
Copyright (c) 2011 Thomas Fuchs, http://mir.aculo.us
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:
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@andyferra
andyferra / github.css
Created April 30, 2012 02:11
Github Markdown CSS - for Markdown Editor Preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@haschek
haschek / .jshintrc
Created May 4, 2012 16:08
JSHint Configuration, Strict Edition
{
// --------------------------------------------------------------------
// JSHint Configuration, Strict Edition
// --------------------------------------------------------------------
//
// This is a options template for [JSHint][1], using [JSHint example][2]
// and [Ory Band's example][3] as basis and setting config values to
// be most strict:
//
// * set all enforcing options to true
@cameronmcefee
cameronmcefee / gist:2641743
Created May 9, 2012 04:14
Font Configuration File
# Font Squirrel Font-face Generator Configuration File
# Upload this file to the generator to recreate the settings
# you used to create these fonts.
{"mode":"expert","formats":["ttf","woff","eot","svg"],"tt_instructor":"default","options_subset":"advanced","subset_custom":"","subset_custom_range":"f000-f073,f200-f273","filename_suffix":"-webfont","emsquare":"2048","spacing_adjustment":"0","rememberme":"Y"}
@tlinkner
tlinkner / Output Android Assets.jsx
Last active July 24, 2018 16:54
Photoshop script to output Android XHDPI, HDPI, MDPI, and LDPI PNGs
// Output Android Assets.jsx
// 2012 Todd Linkner
// License: none (public domain)
// v1.0
//
// This scrip is for Photoshop CS6. It outputs Android XHDPI, HDPI, MDPI,
// and LDPI PNG assets from HDPI source files. The resulting PNGs will be
// placed in sub-folders within your target folder.
/*
@tlinkner
tlinkner / Output Android Icons.jsx
Last active February 19, 2021 14:15
Photoshop script to output Android icons
// Output Android Icons.jsx
// 2012 Todd Linkner
// License: none (public domain)
// v1.0
//
// This script is for Photoshop CS6. It outputs Android icons of the
// following sizes from a source PSD at least 512px x 512px
//
// store:
// Icon.png (512px x 512px)
@tlinkner
tlinkner / Output iOS Assets.jsx
Last active December 11, 2015 16:28
This script is for Illustrator CS6. It outputs iOS standard and @2x assets from layers. It fits the artboard to the items on the layer, including items without fill and stroke.
// Output iOS Assets.jsx
// 2013 Todd Linkner
// License: none (public domain)
// v1.0
//
// This script is for Illustrator CS6. It outputs iOS standard and @2x
// assets from layers.
//
// Script concept and saveToRes function based on herkulano's
// Illustrator Script for Mobile: https://github.com/herkulano
@dherman
dherman / shared-array-buffer.md
Last active October 29, 2023 11:04
fine-grained borrowing (read-write) and sharing (read-only) of buffers

Goal

Typed arrays can be copied or transferred between workers, but it's not possible for multiple workers to work with a buffer in parallel without copies. This document describes two ways to improve this without introducing data races: transferring read-write access to disjoint regions of buffers, and transferring read-only access to shared buffers/regions.

This variant of the API enables fine-grained borrowing and sharing, where a single ArrayBuffer can have multiple disjoint regions parceled out. This way individual workers can work with their regions at their original indices. This makes the API more amenable to being a compilation target.

Example

Here is an example that demonstrates sharing a read-only segment and multiple read-write segments with four separate workers.

@cheeaun
cheeaun / js-error-logging-services.md
Last active December 10, 2023 13:04
JavaScript error logging services