Skip to content

Instantly share code, notes, and snippets.

View rebolyte's full-sized avatar

James Irwin rebolyte

View GitHub Profile
@c-forster
c-forster / noindent.py
Created May 15, 2015 18:51
pandoc filter to create a div class which removes indentation (also requires unprovided CSS for HTML output to work)
#!/usr/bin/python
from pandocfilters import toJSONFilter, RawInline, Para, Space, walk
def latex(s):
return RawInline('latex', s)
def html(s):
return RawInline('html', s)
def deindentParas(key, value, format, meta):

At the editorial offices they could tell that I was hanging around the corridors without purpose or goal. In principle it is accepted that when a correspondent returns from a bureau in the field he has no assignment or work for a certain time and becomes a fifth wheel to our long-suffering, dedicated team. But my alienated behavior and prolonged idleness had exceeded all the limits of tolerance, and Hofman decided to do something with me. Thus there was an attempt — one of a series in my life — to establish me behind a desk. My boss led me to a room containing a desk and a typist and said, "You're going to work here," I looked it over: the typist — yes, she was nice; the desk — abominable. It was one of those small desks, a mousetrap, which sit by the thousands in our cluttered and overcrowded offices. Behind such a desk, a man resembles an invalid in an orthopaedic brace. He cannot stand up normally to shake hands, but must first disengage himself delicately from his chair and cautiously rise, attending more

@iampeterbanjo
iampeterbanjo / package.json
Last active January 4, 2017 06:24
NPM package for working with gohugo.io
{
"name": "hello.hugo",
"version": "1.0.0",
"description": "Test gohugo.io project",
"main": "browserSync.js",
"dependencies": {},
"devDependencies": {},
"config": {
"port": "4646",
"theme": "hyde"
@toomasv
toomasv / regex.red
Last active November 20, 2017 18:22
Regex to parse translator
Red [
Author: "Toomas Vooglaid"
file: "%regex.red"
Purpose: {Regex to parse converter}
History: {Started: 2017-05-09
v.0.1: 2017-05-12 -- first working version with:
start `^^` and end `$` anchors,
non-capturing groups (one level) with alterns,
quantifiers (possessive),
some character-classes.

1-to-1 Project, Contest

description: Expert Designers Community serving Any industry, Any business. Design Logos, websites, and yes, even tattoos - there are so many (90+) categories.

@kitze
kitze / mst.ts
Created February 25, 2018 13:45
MST & TS
import {types} from 'mobx-state-tree';
export const TodoModel = types.model({
title: types.string,
age: types.number
});
export const Todo = TodoModel.actions((self: ITodo) => ({
setTitle: (title: string) => {
self.title = title;
var scripts = ['app.a700a9a3e91a84de5dc0.js']; // script for all users
var newBrowser = (
'fetch' in window &&
'Promise' in window &&
'assign' in Object &&
'keys' in Object
);
if (!newBrowser) {
@greggirwin
greggirwin / red-object-browser.red
Last active October 16, 2020 17:48
Red Object Browser
Red [
title: "Red Object Browser"
author: "Gregg Irwin"
needs: 'View
]
e.g.: :comment
map-ex: func [
"Evaluates a function for all values in a series and returns the results."
@ericelliott
ericelliott / rxjs-patching.js
Created December 10, 2016 00:35
Reduce bundle size with RxJS patching
import { Observable } from 'rxjs/Observable';
// then patch import only needed operators:
import 'rxjs/add/operator/map';
import 'rxjs/add/observable/from';
const foo = Observable.from([1, 2, 3]);
foo.map(x => x * 2).subscribe(n => console.log(n));
@ChrisMBarr
ChrisMBarr / gist:3230548
Created August 1, 2012 20:42
Total up the cost of all items in an Amazon wishlist
var list = $$("#item-page-wrapper .list-items table tbody .lineItemMainInfo .lineItemPart strong");
var total=0;
for(i=0; i<list.length;i++){
total += parseFloat(list[i].innerText.replace("$",""));
}
alert(list.length+" items for a total of: $"+total.toFixed(2));