Skip to content

Instantly share code, notes, and snippets.

@Birowsky
Birowsky / index.js
Created February 16, 2020 15:18
Executing `handler()` in lambda fails with "Cannot find module..".
(function(e, a) { for(var i in a) e[i] = a[i]; }(exports, /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
@Birowsky
Birowsky / PatchIosProject.ts
Last active March 18, 2019 08:38
Revise Sentry's iOS patching procedure
import * as fs from 'fs';
import * as xcode from 'xcode';
export {
patchIosProjectIfNotDoneAlready,
};
interface PbxProjectUnparsed {
parse: (handler: (err: any) => void) => void
}
var path = require('path');
var HtmlWebpackPlugin = require( 'html-webpack-plugin' );
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
context: path.resolve('src/scripts'), //https://webpack.github.io/docs/configuration.html#context
// Usage:
//
// 1. Put this in the file that gets first loaded by RequireJS
// 2. Once the page has loaded, type window.rtree.map() in the console
// This will map all dependencies in the window.rtree.tree object
// 3. To generate UML call window.rtree.toUml(). The output can be used
// here: http://yuml.me/diagram/scruffy/class/draw
requirejs.onResourceLoad = function (context, map, depMaps) {
if (!window.rtree) {
window.rtree = {};
@Birowsky
Birowsky / gist:4469603
Created January 6, 2013 19:20
HTML: starting point
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="css/style.css">
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>