Skip to content

Instantly share code, notes, and snippets.

@vdh
vdh / sentry__cli.d.ts
Created June 1, 2020 05:17
Basic typings for `@sentry/cli`
declare module '@sentry/cli' {
interface UploadSourceMapsOptions {
include: string[]
ignore?: string[]
ignoreFile?: string
rewrite?: boolean
sourceMapReference?: boolean
stripPrefix?: string[]
stripCommonPrefix?: boolean
validate?: boolean
@vdh
vdh / .gitignore
Created November 16, 2016 01:56
Reproduction of a glob bug in gulp (v4) / vinyl-fs / glob-stream
/node_modules/
/output/
@vdh
vdh / Root.jsx
Created September 26, 2016 23:55
Moderately-successful hot reloading for react-router v3
import React, { PropTypes } from 'react';
import { Provider } from 'react-redux'; // Or something else, if you're not using Redux
import Router from 'react-router/lib/Router';
const Root = ({ store, history, routes }) => (
<Provider store={store} key="provider">
<Router history={history} routes={routes} />
</Provider>
);
@vdh
vdh / 01.cmake
Created March 4, 2014 10:49
Drawpile cmake/make output
-- The CXX compiler identification is Clang 5.0.0
-- The C compiler identification is Clang 5.0.0
-- Check for working CXX compiler: /usr/local/Library/ENV/4.3/clang++
-- Check for working CXX compiler: /usr/local/Library/ENV/4.3/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working C compiler: /usr/local/Library/ENV/4.3/clang
-- Check for working C compiler: /usr/local/Library/ENV/4.3/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
@vdh
vdh / JSPackage.rb
Created February 17, 2012 02:02
A fairly simple JS packaging script using UglifyJS
#!/usr/bin/env ruby
# Copyright (c) 2011 Tim van der Horst. Licensed under the MIT License:
# http://www.opensource.org/licenses/mit-license.php
# UglifyJS:
# https://github.com/mishoo/UglifyJS
require "rubygems"
require "optparse"
require "date"
@vdh
vdh / ordinal.rb
Created April 18, 2011 04:15
Ruby class for ordinal numbers
class Integer
def ordinal
cardinal = self.abs
digit = cardinal%10
if (1..3).include?(digit) and not (11..13).include?(cardinal%100)
self.to_s << %w{st nd rd}[digit-1]
else
self.to_s << 'th'
end
end
@vdh
vdh / .rvmrc
Created March 23, 2011 00:42
A script to remove erroneous duplicate ACL permissions on Mac OS 10.6
#!/usr/bin/env bash
# This is an RVM Project .rvmrc file, used to automatically load the ruby
# development environment upon cd'ing into the directory
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional,
# Only full ruby name is supported here, for short names use:
# echo "rvm use 1.8.7" > .rvmrc
environment_id="ruby-1.8.7-p249@aclfix"