Skip to content

Instantly share code, notes, and snippets.

View gtarsia's full-sized avatar
Working from home

hello there gtarsia

Working from home
View GitHub Profile
gtarsia /
Last active December 6, 2021 16:38
(rails + webpacker + coffeescript 2 + vue + vuex + jsx) from an existing rails project, with proper structure


Remember that using vue jsx has some caveats. Most importantly that most vue builtin directives are not supported (for example, v-for, v-model, etc.), expect for v-show. Some of them can be implemented manually, but v-model for example is kind of a pain in the ass.
There's this though:

Also the sourcemap result is kind of crappy, things like @ are not mapped correctly, I resorted to just using 'eval' as webpack config.devtool, it's good enough for what I'm doing.


using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
public static class StreamExtensions
public static IEnumerable<TResult> ReadJson<TResult>(this Stream stream)
var serializer = new JsonSerializer();
gtarsia / tamper-mantis.js
Last active August 29, 2015 14:27
A tampermonkey script to be able to track multiple hours at once in mantis.
// ==UserScript==
// @name Mantis ajax
// @namespace http://your.homepage/
// @version 0.1
// @description enter something useful
// @author You
// @match
// ==/UserScript==
/* To track hours, you do this:
gtarsia / gist:f139cb4e452d9d12b8f5
Last active August 29, 2015 14:18
Hide reddit comments by click the side of the comment
function hide(obj) {
var shouldClick = true;
var preventClickEvent = false;