Skip to content

Instantly share code, notes, and snippets.

View wozozo's full-sized avatar
πŸ˜‡
Hello

wozozo

πŸ˜‡
Hello
  • Tokyo, Japan
View GitHub Profile
class Accessor(object):
def __init__(self, wrapper, d):
self.wrapper = wrapper
self.d = d
def __repr__(self):
return repr(self.d)
def _get_failback(self, k):
chained = self.wrapper.chained
class Tab
constructor: ->
@$tabs = ($ '.tab')
@$sections = ($ '.section')
@_idx = 0
current_tab: =>
@$tabs.eq(@_idx)
current_section: =>
@hitode909
hitode909 / access_log.webtailrc.js
Created October 31, 2012 10:13
webtailγ§γ‚’γ‚―γ‚»γ‚Ήγƒ­γ‚°θžγγ‚„γ€
if (!context.setup) {
context.setup = true;
var app = {
counts: {
GET: 0,
POST: 0,
},
$log: $('<pre>').appendTo($(document.body)),
urls: [],
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active October 15, 2025 02:35
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@ojii
ojii / cbv_decorator.py
Created January 27, 2013 05:42
Class based view decorators for Django
def cbv_decorator(decorator):
"""
Turns a normal view decorator into a class-based-view decorator.
Usage:
@cbv_decorator(login_required)
class MyClassBasedView(View):
pass
"""
import os
import pty
pair = pty.fork()
if not pair[0]:
os.execvp('python', ['python'])
s = os.fdopen(pair[1], 'w+')
while True:
@hagino3000
hagino3000 / capture.js
Last active January 21, 2020 22:21
Capture screenshot using phantom.js
var page = new WebPage(),
address, output, size;
if (phantom.args.length != 2) {
console.log('Give me URL and filename');
phantom.exit();
} else {
address = phantom.args[0];
output = phantom.args[1];
page.viewportSize = { width: 1024, height: 768 };
@neara
neara / forms.py
Last active June 10, 2024 15:30
Django Class Based Views and Inline Formset Example
from django.forms import ModelForm
from django.forms.models import inlineformset_factory
from models import Sponsor, Sponsorship
class SponsorForm(ModelForm):
class Meta:
model = Sponsor
@voluntas
voluntas / shiguredo_tech.rst
Last active May 13, 2025 02:58
ζ™‚ι›¨ε ‚γ‚’ζ”―γˆγ‚‹ζŠ€θ‘“

ζ™‚ι›¨ε ‚γ‚’ζ”―γˆγ‚‹ζŠ€θ‘“

ζ—₯ζ™‚:2025-05-13
作:時雨堂
バージョン:2025.3
URL:https://shiguredo.jp/

言θͺž

@voluntas
voluntas / django-s3-imagekit-celery.rst
Last active May 13, 2022 13:46
S3 γ¨ιžεŒζœŸγ‚΅γƒ γƒγ‚€γƒ«δ½œζˆ γ‚³γƒˆγƒγ‚Έγƒ‘

S3 γ¨ιžεŒζœŸγ‚΅γƒ γƒγ‚€γƒ«δ½œζˆ γ‚³γƒˆγƒγ‚Έγƒ‘

ζ›΄ζ–°:2013-12-08
バージョン:0.1.8
δ½œθ€…:@voluntas
URL:http://voluntas.github.io/

概要