Skip to content

Instantly share code, notes, and snippets.

Working from home

Pavel Katsev p7k

Working from home
View GitHub Profile
from django.db import models
from django.contrib.auth.models import User
from imagekit.models import ImageSpec
from imagekit.processors import resize, Adjust
from django.db.models.signals import post_save
from django.dispatch import receiver
from celery.task import task
from celery.execute import send_task
peteonrails / geos
Created Nov 10, 2011
Updating the Homebrew formula for geos, when Mac OS X Lion complains about LLVM / gcc-4.2
View geos
require 'formula'
class Geos < Formula
url ''
homepage ''
md5 'b1ceefe205c9ee520b99f2b072c345f7'
def skip_clean? path
path.extname == '.la'
rozza / gist:1372780
Created Nov 17, 2011
Encoder for MongoEngine Object
View gist:1372780
import datetime
import simplejson
from pymongo.dbref import DBRef
from pymongo.objectid import ObjectId
class MongoEngineEncoder(simplejson.JSONEncoder):
"""Handles Encoding of ObjectId's"""
martijnvermaat /
Last active Mar 24, 2017
Mutalyzer transcript mapping imports
# NCBI36
wget -O - \
| zcat | sort -t $'\t' -k 11,11 -k 2,2 > /tmp/
mutalyzer-admin assemblies import-mapview -a hg18 /tmp/ 'reference'
mutalyzer-admin assemblies import-reference -a hg18 'NC_001807.4'
# GRCh37
wget -O - \
| zcat | sort -t $'\t' -k 11,11 -k 2,2 > /tmp/
mutalyzer-admin assemblies import-mapview -a hg19 /tmp/ 'GRCh37.p13-Primary Assembly'
PyYoshi /
Last active Jun 13, 2018
Disable Transparent Huge Pages on CoreOS
$ sudo -i
# vim /etc/systemd/system/disable-transparent-huge-pages.service
# systemctl enable disable-transparent-huge-pages
# systemctl start disable-transparent-huge-pages
# systemctl status disable-transparent-huge-pages
# cat /sys/kernel/mm/transparent_hugepage/enabled
# cat /sys/kernel/mm/transparent_hugepage/defrag
rklaehn / Client example
Last active Jun 8, 2020
akka http file server
View Client example
package akkahttptest
import akka.http.Http
import{Sink, Source}
import akka.http.model._
object TestClient extends App {
markjlorenz / mutt_notes.markdown
Last active Jul 25, 2021
Notes on getting Mutt running on OSX
View mutt_notes.markdown
  • brew install mutt
  • setup an app password for mutt in gmail
  • setup an app password for imap_notifier in gmail
  • brew install terminal-notifier terminal-notifier
  • gem install imap_notifier imap_notifier
  • brew install urlview
  • brew install w3m (links would be OK too)
  • Install pandoc to author in markdown and send as HTML


hshoff / Blackbored.xml
Created Feb 1, 2011
Textmate's Blackboard color theme cloned (kind-of) for RubyMine.
View Blackbored.xml
<?xml version="1.0" encoding="UTF-8"?>
<scheme name="Blackbored" version="1" parent_scheme="Default">
<option name="LINE_SPACING" value="1.25" />
<option name="EDITOR_FONT_SIZE" value="12" />
<option name="EDITOR_FONT_NAME" value="Monaco" />
<option name="ANNOTATIONS_COLOR" value="3e83e7" />
<option name="CARET_COLOR" value="" />
<option name="CARET_ROW_COLOR" value="40436" />
<option name="CONSOLE_BACKGROUND_KEY" value="0" />
t-io /
Last active Sep 13, 2022
Install most of my Apps with homebrew & cask
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Install and Set San Francisco as System Font
ruby -e "$(curl -fsSL"
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL"
burke /
Last active Sep 23, 2022
This sets up keybindings in tmux that allow you to copy/paste to/from your OS X clipboard from tmux running inside an SSH connection to a remote host. Partially borrowed from

Local (OS X) Side


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "">
<plist version="1.0">