Skip to content

Instantly share code, notes, and snippets.

Jökull Sólberg Auðunsson jokull

Block or report user

Report or block jokull

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jokull
jokull / Dockerfile
Created Mar 28, 2017
Python with texpdf binary
View Dockerfile
FROM python:2.7
MAINTAINER Solberg Audunsson <solberg@takumi.com>
# Install uWSGI
RUN pip install uwsgi pipenv
# Standard set up Nginx
ENV NGINX_VERSION 1.9.11-1~jessie
@jokull
jokull / fasteignir.py
Created Feb 20, 2017
Get notified when a new property listing on visir.is is discovered
View fasteignir.py
import os
import json
import lxml.html
from lxml.cssselect import CSSSelector
import requests
cookies = {
'session_name': 'dpoiudav0gnu6e8uf2uklift63',
}
@jokull
jokull / .env
Created May 17, 2016
Find follower accounts that have profile pics with faces in them
View .env
OAUTH_CONSUMER_KEY=
OAUTH_CONSUMER_SECRET=
OAUTH_TOKEN=
OAUTH_TOKEN_SECRET=
IMGIX_TOKEN=
View keybase.md

Keybase proof

I hereby claim:

  • I am jokull on github.
  • I am jokull (https://keybase.io/jokull) on keybase.
  • I have a public key whose fingerprint is 433B F05A 668A 1878 2A74 FAC7 32EE 39EB 0247 7299

To claim this, I am signing this object:

@jokull
jokull / .profile
Created Nov 21, 2013
Bash Profile
View .profile
PATH=/usr/local/bin:/usr/local/sbin:$PATH
PATH=/usr/local/share/npm/bin:$PATH
PATH=/usr/local/heroku/bin:$PATH
export HISTSIZE=1000
source /usr/local/Cellar/autoenv/0.1.0/activate.sh
source /usr/local/etc/bash_completion.d/git-completion.bash
export LC_CTYPE=is_IS.UTF-8
View gist:7466602
[user]
name = Jökull Sólberg Auðunsson
email = jokull@solberg.is
[core]
excludesfile = ~/.gitignore
editor = subl -n -w
[difftool]
prompt = false
[diff]
tool = Kaleidoscope
@jokull
jokull / gist:5639728
Created May 23, 2013
Cache a python package from PyPI on S3
View gist:5639728
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""pycache -- cache a python package from PyPI on S3.
A simple script to collect a cache of packages locally and sync them up to an S3 bucket, using directories as namespaces so that different projects can have different dependencies.
This is just about the simplest thing that could possibly work.
"""
import warnings
warnings.filterwarnings('ignore')
@jokull
jokull / gist:5498543
Created May 1, 2013
Example of an RQ exception handler that allows three failures before moving to the failed queue
View gist:5498543
queues = []
def retry_handler(job, exc_type, exc_value, traceback):
# Returning True moves the job to the failed queue (or continue to
# the next handler)
job.meta.setdefault('failures', 1)
job.meta['failures'] += 1
if job.meta['failures'] > 3 or isinstance(exc_type, (LookupError, CorruptImageError)):
job.save()
@jokull
jokull / Preferences.sublime-settings
Last active Dec 14, 2015
Sublime Text 2 settings for Python development with nice linting colors
View Preferences.sublime-settings
{
"auto_complete": false,
"close_windows_when_empty": false,
"color_scheme": "Packages/User/Tomorrow-Night.tmTheme",
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"find_selected_text": true,
"fold_buttons": false,
"folder_exclude_patterns":
[
@jokull
jokull / .osx.sh
Created Mar 12, 2013
My Mountain Lion settings
View .osx.sh
# Disable opening and closing window animations
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
# Increase window resize speed for Cocoa applications
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
# Save to disk (not to iCloud) by default
You can’t perform that action at this time.