Skip to content

Instantly share code, notes, and snippets.

View pavelgolovan's full-sized avatar

Pavel Halavan pavelgolovan

View GitHub Profile
@pavelgolovan
pavelgolovan / xcodedl.sh
Last active November 14, 2019 11:04
Xcode downloader. Restarts dl on failure.
#!/usr/bin/env bash
# Open https://developer.apple.com/download/more/
# Login with your app store credentials
# Open chrome dev tools -> Network
# Tap download xcode link
# On network pane right click on dl request -> Copy as cURL
# Run this script as $: dlcmd="Paste curl cmd from clipboard" output="xcode.xip" ./xcodedl.sh
ec=18
@pavelgolovan
pavelgolovan / try-catch-perf.js
Last active September 11, 2016 19:50
try-catch vs try-catcher vs try-catch-iterate vs try-catcher-iterator wrapper
'use strict';
const ITERATIONS = 10000000;
const ERROR = new Error('Test error');
function tryCatcher(fn, ctx, args) {
try {
return fn.apply(ctx, args);
}
catch(err) {