Skip to content

Instantly share code, notes, and snippets.

sellout / color-theme-solarized.el
Created Mar 26, 2011
First step of a Solarized color theme for Emacs (
View color-theme-solarized.el
(require 'color-theme))
(defun color-theme-solarized (mode)
"Color theme by Ethan Schoonover, created 2011-03-24.
Ported to Emacs by Greg Pfeil,"
(interactive "Slight or dark? ")
(let ((base03 "#002b36")
(base02 "#073642")
(base01 "#586e75")
baali /
Last active May 28, 2016
MajorClust algorithm implementation using sklearn based on SO conversation about text clustering using python(
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import linear_kernel
import numpy as np
from itertools import combinations
from random import shuffle
def majorclust_sklearn():
texts = [
"foo blub baz",
"foo bar baz",
edrex /
Last active Jun 8, 2016
Camlistore on a VPS with S3 blob storage

Let's set up Camlistore on a Linux server, with blobs stored in s3. This seems to be the currently best-supported option for "cloud" deployment.

This is meant as a supplement to the official server config doc. Read through both docs before you start.

This blog post is also recommended reading.

I've posted my config files for reference, but they will be created the first time you run camlistored (for the server) and camput init (for the client) so don't copy them.

View New Years Resolution - Learn eLisp For Emacs
Interested in learning eLisp for Emacs, ever thought you should?
I wanted to learn eLisp but there are no decent beginners' book - so I decided to write one - and by decent I mean super-basic starting assuming you know nothing at all.
It is my 'official' side-project; something to work on when I am bored or blocked in my main work.
You can see how much progress I have made here:
The book will get written quicker if other people muck in.
zzgvh /
Created Aug 8, 2018
Alternative project access restriction model
class RestrictedUserProjectsByOrg(models.Model):
user = models.OneToOneField('User', related_name='restricted_projects')
organisation = models.ForeignKey('Organisation', related_name='restricted_users')
is_restricted = models.BooleanField(default=False) #do we need this?
restricted_projects = models.ManyToManyField(
'Project', related_name='inaccessible_by', null=True, blank=True)
Descriptions of events and pseudo code. One question I haven't thought through is multiple employments
by both user and admin
punchagan / .gitignore
Last active Oct 17, 2019
Whatsapp Broadcast Export to Zulip
View .gitignore
nullpofy / .gitignore
Created Aug 5, 2010
HTML5 Presentation export for Org-mode
View .gitignore
alysonla / active-issues.sql
Last active Nov 28, 2019
Queries that power the open source section of the 2016 Octoverse report
View active-issues.sql
-- Active issues
-- Count of total active issues in the specified time frame
-- Source: githubarchive public data set via Google BigQuery
COUNT(DISTINCT JSON_EXTRACT_SCALAR(events.payload, '$')) AS events_issue_count
FROM (SELECT * FROM TABLE_DATE_RANGE([githubarchive:day.],TIMESTAMP('2015-09-01'),TIMESTAMP('2016-08-31')))
AS events
-- 10,723,492 active issues
dmedvinsky / xwrits-lock-hooks.diff
Created Sep 1, 2010
Adds ability to execute sh scripts in xwrits before lock and after unlock.
View xwrits-lock-hooks.diff
diff -u xwrits-2.26//main.c xwrits/main.c
--- xwrits-2.26//main.c 2009-04-04 01:17:02.000000000 +0400
+++ xwrits/main.c 2010-09-01 14:06:52.531052264 +0400
@@ -10,6 +10,7 @@
#include <X11/extensions/Xinerama.h>
+#include <signal.h>
static Options onormal;
zflat /
Last active Mar 27, 2020
Migrate pg dump from Heroku to local sqlite3 development (and beyond)
# Export the Heroku PG database to a local dump file
heroku pgbackups:capture
curl -o latest.dump `heroku pgbackups:url`
# Install postregs & Setup password
# List databases
sudo -u postgres psql -l
You can’t perform that action at this time.