Skip to content

Instantly share code, notes, and snippets.

View Almad's full-sized avatar

Almad Almad

View GitHub Profile
@Almad
Almad / obsidian-web-clipper.js
Last active October 28, 2023 13:06 — forked from kepano/obsidian-web-clipper.js
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: (function() {
function main() {
if (!window.Turndown || !window.Readability) {
console.log("Libraries not loaded, see below")
console.log(window.Turndown)
console.log(window.Readability)
}
else {
console.log("loading")
let Readability = window.Readability;
@Almad
Almad / example.js
Last active January 3, 2016 04:19 — forked from anonymous/example.js
Do not recurse
var https = require('https');
var limit = 2 * 1000;
function fetch(cb) {
var req = https.request('https://url', function(res) {
var text = '';
res.on('data', function(chunk) {
text += chunk;
@Almad
Almad / gist:1009319
Created June 5, 2011 19:41 — forked from dg/gist:1009307
Routing in Django verus Nette Framework

DJANGO

In urls.py

# urls like "articles/2011/tutorial03" or "articles/2011/tutorial03.html"

urlpatterns = patterns('',
    (r'articles/(?P<year>(?U)\\d+)/(?P<item>(?U)[^/]+)(?:\\.htm(?:l)?)?/?\$', 'articles.detail'),
)
@Almad
Almad / fabfile.py
Created July 31, 2010 12:12 — forked from fiee/fabfile.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
fabfile for Django
------------------
see http://morethanseven.net/2009/07/27/fabric-django-git-apache-mod_wsgi-virtualenv-and-p/
modified for fabric 0.9/1.0 by Hraban (fiëé visuëlle)
several additions, corrections and customizations, too
@Almad
Almad / gist:217726
Created October 24, 2009 20:23 — forked from jezdez/gist:217442
:⌉
=⌉
¦-) as opposed to |
⍥ om nom nom