Skip to content

Instantly share code, notes, and snippets.

View yrik's full-sized avatar

Yura Kriachko yrik

View GitHub Profile
@ojii
ojii / very_dangerous_script.py
Created February 3, 2011 16:12
DONT USE THIS IF YOU DONT KNOW EXACTLY WHAT IT DOES AND HOW IT DOES IT!
'''
WARNINGS: THIS SCRIPT COMES WITHOUT ANY WARRANTY AND RUNNING IT IS DONE SO AT YOUR OWN RISK!
'''
from cms.models import Page
def setup():
from django.contrib.auth.models import User
from cms.utils.permissions import set_current_user
set_current_user(User.objects.get(id=1))
def check_no_moderator():
@justquick
justquick / fabfile.py
Created May 9, 2011 01:33
Simple fabfile to deploy my django projects on a gunicorn + nginx setup
import os
import sys
from fabric.api import abort, run, sudo, env, cd
from fabric.colors import red, green
from fabric.contrib.files import exists, put, upload_template
ROOT = '/home/jquick/code/'
WORKON = '/home/jquick/.virtualenvs'
VENVS = {
# ROUTER
GWS.Router.map (match) ->
#match("/").to("home") # home.handlebars gets rendered automatically and mapped to /
# according to guide the previous logic shouldn't be needed. but it won't work without it
# you can either use model: () -> or
# setupController: (controller, model) ->
# controller.set 'content', model
@aiguofer
aiguofer / README.md
Last active April 27, 2023 19:12
Get info about running jupyter notebooks including memory consumption, how long they've been running, etc.