Skip to content

Instantly share code, notes, and snippets.


Mardix mardix

View GitHub Profile
manekinekko / regex-es6-imports.js
Last active Dec 16, 2020
A regular Expression to parse ECMAScript6 import syntax
View regex-es6-imports.js
let regex = `import
([\w*{}\n, ]+)
manigandham /
Last active Feb 16, 2021
Rich text / HTML editors and frameworks

Strictly Frameworks

Abstracted Editors

These use separate document structures instead of HTML, some are more modular libraries than full editors

  • ProseMirror - - supports collaborative editing, offers similar options to Mobiledoc for data structure
View generateTemplateString.js
* Produces a function which uses template strings to do simple interpolation from objects.
* Usage:
* var makeMeKing = generateTemplateString('${name} is now the king of ${country}!');
* console.log(makeMeKing({ name: 'Bryan', country: 'Scotland'}));
* // Logs 'Bryan is now the king of Scotland!'
var generateTemplateString = (function(){
# coding=UTF-8
from __future__ import division
import re
# This is a naive text summarization algorithm
# Created by Shlomi Babluki
# April, 2013
class SummaryTool(object):
from bitarray import bitarray
import mmh3
class BloomFilter:
def __init__(self, size, hash_count):
self.size = size
self.hash_count = hash_count
self.bit_array = bitarray(size)
fideloper /
Last active Jan 28, 2021
Create vHost Ubuntu Lamp-Server (bash and python)
#! /usr/bin/python
from sys import argv
from os.path import exists
from os import makedirs
from os import symlink
from os import system
import getopt
raymyers /
Created Oct 25, 2011
Watch Directory For Changes (python)
import os, time, sys, fnmatch
path_to_watch = "D:/Projects/consumer-purchase-webapp/WebContent/js"
def findCoffeeFiles():
matches = []
for root, dirnames, filenames in os.walk(path_to_watch):
for filename in fnmatch.filter(filenames, '*.coffee'):
matches.append(os.path.join(root, filename))
return matches
jedp /
Created Apr 18, 2011 — forked from j4mie/ - redis autocompleter
A redis autocomplete example for multi-word phrases.
Based on:
Ruby original:
Python original:
See options below for usage