This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Resize Frame on Horizontal Splitting. | |
;; Written by Kridsada Thanabulpong <[email protected]>. | |
;; Published as public domain. | |
(setq default-width (frame-width)) | |
(when window-system | |
(add-hook 'window-configuration-change-hook | |
'(lambda () | |
(setq windows ()) | |
(dolist (w (window-list)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns sesscookie.core | |
(:use compojure.core | |
ring.adapter.jetty | |
ring.middleware.session | |
ring.middleware.session.cookie)) | |
(defn write-index [req] | |
{:status 200 | |
:body (str ":demo-session " (get-in req [:session :demo-session]) "\n" | |
":demo-cookies " (get-in req [:cookies "demo-cookies"]))}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns ringcookie.core | |
(:use ring.adapter.jetty | |
ring.middleware.cookies | |
ring.middleware.session | |
ring.middleware.session.cookie)) | |
(defn app | |
[req] | |
{:status 200 | |
:cookies {:test-cookie "foobar"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class WkhtmltopdfQt < Formula | |
# This is the latest staging branch commit, dated 6 JAN 2012. | |
url 'https://qt.gitorious.org/qt/wkhtmltopdf-qt/archive-tarball/6053b687d24956d0a7eac21a015172b29cf0f451' | |
sha1 '3a48649a2082ced3153bd2841d1e8a94a5e74a4f' | |
version '6053b68' | |
end | |
class Wkhtmltopdf < Formula |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "foobar" as FooBar | |
import "lorem_ipsum" as LoremIpsum | |
console.log FooBar | |
console.log LoremIpsum |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.vagrant/ | |
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo < ActiveRecord::Base | |
has_many :bars, :include => [:user] | |
end | |
class Bar < ActiveRecord::Base | |
belongs_to :foo | |
belongs_to :user | |
def self.some_complex_count | |
joins(:somewhere_else).joins(:someother_table).where do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist> | |
<dict> | |
<key>Label</key> | |
<string>com.gridth.anchor</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/Users/sirn/.virtualenvs/default/bin/python</string> | |
<string>-m</string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from .tasks import celery, configure_celery | |
# ... | |
def main(global_config, **settings): # pragma: no cover | |
""" This function returns a Pyramid WSGI application. | |
""" | |
# ... | |
configure_celery(celery, settings) | |
# ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Python 3.2.3 (default, Sep 25 2013, 18:22:43) | |
[GCC 4.6.3] on linux2 | |
Type "help" for more information. | |
Environment: | |
app The WSGI application. | |
registry Active Pyramid registry. | |
request Active request object. | |
root Root of the default resource tree. | |
root_factory Default root factory used to create `root`. |
OlderNewer