Skip to content

Instantly share code, notes, and snippets.

@mkastner
mkastner / compsition.js
Created March 28, 2022 18:41
Composition/Inheritance JavaScript
// Part I: objects and composition
const Person = {
set givenName(givenName) {
this._givenName = givenName;
},
set familyName(familyName) {
this._familyName = familyName;
},
fullName() {
@mkastner
mkastner / gist:afdec77bcea9db437be8b3b693cafa3e
Created March 16, 2018 07:33
Webpack array include before babel-polyfill call
This file has been truncated, but you can view the full file.
/******/ (function(modules) { // webpackBootstrap
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1]
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0, resolves = [];
/******/ for(;i < chunkIds.length; i++) {
@mkastner
mkastner / prawn hyphenation issue
Created April 29, 2012 08:49
When using column_box hyphenation character is being redered in last line of parargraphs
require 'prawn'
class Hyphen < Prawn::Document
def initialize
super(:margin => [10,10,10,10], :page_size => 'A4')
column_box([0, cursor], columns: 2, width: bounds.width) do
text "This is a test where the very important Hy#{Prawn::Text::SHY}phe#{Prawn::Text::SHY}na#{Prawn::Text::SHY}tion works fine here, but which contains Hy#{Prawn::Text::SHY}phe#{Prawn::Text::SHY}na#{Prawn::Text::SHY}tion\n in the last line of the paragraph Hy#{Prawn::Text::SHY}phe#{Prawn::Text::SHY}na#{Prawn::Text::SHY}ted\n"
bounds.move_past_bottom
text "second column"