Skip to content

Instantly share code, notes, and snippets.

import re
# Events - start tag, end tag
START = 'start'
END = 'end'
def regex_lexer(markup, rgx_tag="<(?P<event>/?)(?P<tag>[A-Z])>"):
""" Regex-based lexer.
@AlexanderAA
AlexanderAA / filetypes.Tj.conf
Last active December 22, 2016 14:00
Taskjuggler syntax highlighting for Geany editor
# For complete documentation of this file, please see Geany's main documentation
[styling=C]
[keywords]
# all items must be in one line
primary=accountprefix accountreport accountroot active adopt aggregate alert alertlevels alternative author auxdir balance caption cellcolor celltext center charge chargeset columnid columns complete copyright credits currency currencyformat dailymax dailymin dailyworkinghours date definitions depends details disabled duration efficiency effort effortdone effortleft email enabled end endcredit epilog fail flags fontcolor footer formats functions gapduration gaplength halign hasalert header headline height hideaccount hidejournalentry hidereport hideresource hidetask icalreport include inherit interval1 interval2 interval3 interval4 isactive ischildof isdependencyof isdutyof isfeatureof isleaf ismilestone isongoing isresource isresponsibilityof istask isvalid journalattributes journalmode leaveallowance leaves length limits listitem listtype loadunit logicalexpression logical
@AlexanderAA
AlexanderAA / filetypes.Ur.conf
Last active December 22, 2016 13:59
Ur/Web syntax highlighting for Geany editor
# For complete documentation of this file, please see Geany's main documentation
[styling=CAML]
[keywords]
keywords=and con constraint constraints cookie datatype end fn fun open sequence struct structure style table task type val view
keywords_optional=
[lexer_properties=CAML]
[settings]
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://d3js.org/topojson.v1.min.js"></script>
<script src="http://datamaps.github.io/scripts/datamaps.world.min.js?v=1"></script>
<h2>Datamaps Playground</h2>
<p><a href="http://datamaps.github.io/">DataMaps Project Homepage</a></p>
<div id="container1" style="position: relative; width: 80%; max-height: 450px;"></div>
fun show_doubletuple [t ::: Type] (_ : show t) =
mkShow (fn ii =>
List.foldr
String.append
""
("⦉" :: (show ii.1) :: ", " :: (show ii.2) :: "⦊" :: [])
)
##### DEBIAN ################
# Debian Experimental
# deb http://ftp.de.debian.org/debian experimental main contrib non-free
# deb-src http://ftp.de.debian.org/debian experimental main contrib
# Debian Sid # CURRENT UNSTABLE
# deb http://ftp.de.debian.org/debian sid main contrib non-free
# deb-src http://ftp.de.debian.org/debian sid main contrib non-free
# Debian 8.0 (Jessie) # CURRENT TESTING
@AlexanderAA
AlexanderAA / README.md
Created November 20, 2015 02:07 — forked from gdamjan/README.md
Setup for an easy to use, simple reverse http tunnels with nginx and ssh. It's that simple there's no authentication at all. The end result, a single ssh command invocation gives you a public url for your web app hosted on your laptop.

What

A lot of times you are developing a web application on your own laptop or home computer and would like to demo it to the public. Most of those times you are behind a router/firewall and you don't have a public IP address. Instead of configuring routers (often not possible), this solution gives you a public URL that's reverse tunnelled via ssh to your laptop.

Because of the relaxation of the sshd setup, it's best used on a dedicated virtual machine just for this (an Amazon micro instance for example).

Requirements

@AlexanderAA
AlexanderAA / The Technical Interview Cheat Sheet.md
Last active August 25, 2015 22:48 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
{-# LANGUAGE DeriveDataTypeable, GADTs #-}
-- | Merging of indexed types
module MergeIx (
main,
merge,
runTests,
Col(..),
Row(..),
{-# LANGUAGE DeriveDataTypeable #-}
-- | Merging of indexed types
module MergeIx (
main
) where
import Data.Typeable
import qualified Data.Sequence as S