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
django-mingus | |
django-ratings | |
django-ajax-validation | |
django-google-analytics | |
django-mailer |
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 external_apps/products/models.py "" | |
from django.db import models | |
from django.contrib.auth.models import User | |
class BaseProduct(models.Model): | |
name = models.CharField(max_length = 100, blank = False, null = False) | |
description = models.CharField(max_length = 200, blank = True, null = True, default = None) | |
long_description = models.TextField(blank = True, null = True, default = None) | |
product_details = models.TextField(blank = True, null = True, default = None) |
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 fabric.api import * | |
""" | |
Base configuration | |
""" | |
env.project_name = '$(project)' | |
env.database_password = '$(db_password)' | |
env.site_media_prefix = "site_media" | |
env.admin_media_prefix = "admin_media" | |
env.newsapps_media_prefix = "na_media" |
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
<ul class="menu"> | |
<li><%= link_to 'Companies', companies_path %></li> | |
<li><%= link_to 'Courses', courses_path %></li> | |
<li class="menu-item-right"><%= link_to 'Back to Tools', '#' %></li> | |
</ul> | |
<style> | |
.menu { | |
background-color: #016700; |
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
servers = ( | |
{ | |
address = "chat.freenode.net"; | |
chatnet = "freenode"; | |
port = "6667"; | |
autoconnect = "Yes"; | |
use_ssl = "no"; | |
ssl_verify = "no"; | |
} | |
); |
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
;; emacs configuration | |
(push "/usr/local/bin" exec-path) | |
(add-to-list 'load-path "~/.emacs.d") | |
(setq make-backup-files nil) | |
(setq auto-save-default nil) | |
(setq-default tab-width 2) | |
(setq-default indent-tabs-mode nil) | |
(setq inhibit-startup-message t) |
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 'socket' | |
require 'timeout' | |
def is_port_open?(ip, port) | |
begin | |
Timeout::timeout(1) do | |
begin | |
s = TCPSocket.new(ip, port) | |
s.close | |
return true |
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 engine/js/lib/closure-library/closure/bin/build/closurebuilder.py --root=engine/js/lib/closure-library/closure/goog/ --root=engine/js/lib/closure-library/closure/../third_party/closure/goog/ --root=engine/js/cpda/ --output_mode=compiled --compiler_flags="--compilation_level=ADVANCED_OPTIMIZATIONS" --compiler_flags="--warning_level=VERBOSE" --compiler_flags="--externs=engine/js/externs/flowplayer.js" --compiler_flags="--externs=engine/js/externs/sound_manager.js" --compiler_flags="--define=cpda.SCRIPT_PATH='compiled.js'" --compiler_flags="--define=cpda.engine.SUPPORTED_LANGUAGES_STRING='ar en es_419 ru th zh_Hans'" --compiler_flags="--jscomp_error=ambiguousFunctionDecl" --compiler_flags="--jscomp_error=checkTypes" --compiler_flags="--jscomp_error=deprecated" --compiler_flags="--jscomp_error=checkVars" --compiler_flags="--jscomp_error=externsValidation" --compiler_flags="--jscomp_error=fileoverviewTags" --compiler_flags="--jscomp_error=globalThis" --compiler_flags="--jscomp_error=inter |
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
namespace :tweets do | |
desc 'Send some tweets to a user' | |
task :send, [:username] => [:environment] do |t, args| | |
args.with_defaults(:username => 'cpytel') | |
Tweet.send(args[:username]) | |
end | |
end |
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
# coding: utf-8 | |
require 'sinatra' | |
set server: 'thin', connections: [] | |
get '/' do | |
halt erb(:login) unless params[:user] | |
erb :chat, locals: { user: params[:user].gsub(/\W/, '') } | |
end | |
get '/stream', provides: 'text/event-stream' do |
OlderNewer