Skip to content

Instantly share code, notes, and snippets.

@aleksihakli
aleksihakli / models.py
Last active August 20, 2021 16:07
Django single session
from django.conf import settings
from django.contrib.sessions.models import Session
from django.db import models
class UserSession(models.Model):
"""
UserSession
Session tracking and management inspired by Gavin Ballard:
@cjp
cjp / .el
Last active May 15, 2023 09:40
How to get org-protocol to work with spacemacs
;; I have no idea why it works. This is the product of 4 hours of trial-and-error.
(defun dotspacemacs/user-init ()
"Initialization function for user code.
It is called immediately after `dotspacemacs/init'. You are free to put almost
any user code here. The exception is org related code, which should be placed
in `dotspacemacs/user-config'."
(server-start)
(require 'org-protocol)
)
@jnv
jnv / Gemfile
Created September 17, 2013 23:04
trello2github: A hacky and awful Trello cards to GitHub Issues import. Imports Trello color labels and cards' lists as labels, skips archived cards.
source "https://rubygems.org"
gem "octokit", "~> 2.0"
gem "json"
gem "recursive-open-struct"
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"