Skip to content

Instantly share code, notes, and snippets.

View maksudc's full-sized avatar

Md. Maksud Alam Chowdhury maksudc

  • Dhaka , Bangladesh
View GitHub Profile
@maksudc
maksudc / Bus Sql
Created September 23, 2012 17:04 — forked from anonymous/Bus Sql
DELIMETER |
CREATE EVENT history_generator
ON SCHEDULE EVERY 1 DAY
DO
BEGIN
DECLARE scount INT DEFAULT 0;
DECLARE tschedule INT DEFAULT 0;
DECLARE schedule_1_id INT DEFAULT 0;
DECLARE schedule_2_id INT DEFAULT 0;
DECLARE counter INT DEFAULT 0;
Counting objects: 9, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 489 bytes, done.
Total 5 (delta 3), reused 0 (delta 0)
remote: [Sun Jun 30 04:02:35 2013] [warn] module php5_module is already loaded,
skipping
remote: Waiting for stop to finish
remote: CLIENT_RESULT: Stopping CRON cart
remote: python-2.7 application is already stopped!
#!/bin/bash
# This deploy hook gets executed after dependencies are resolved and the
# build hook has been run but before the application has been started back
# up again. This script gets executed directly, so it could be python, php,
# ruby, etc.
#todo: get python version
# This is not correct -- will return python-2.6
==> python-2.7/logs/appserver.log <==
File "/var/lib/openshift/517feb885973ca8174000093/python-2.7/virtenv/lib/python2.7/site-packages/distribute-0.6.46-py2.7.egg/pkg_resources.py", line 916, in resource_filename
self, resource_name
File "/var/lib/openshift/517feb885973ca8174000093/python-2.7/virtenv/lib/python2.7/site-packages/distribute-0.6.46-py2.7.egg/pkg_resources.py", line 1449, in get_resource_filename
self._extract_resource(manager, self._eager_to_zip(name))
File "/var/lib/openshift/517feb885973ca8174000093/python-2.7/virtenv/lib/python2.7/site-packages/distribute-0.6.46-py2.7.egg/pkg_resources.py", line 1477, in _extract_resource
self.egg_name, self._parts(zip_path)
File "/var/lib/openshift/517feb885973ca8174000093/python-2.7/virtenv/lib/python2.7/site-packages/distribute-0.6.46-py2.7.egg/pkg_resources.py", line 992, in get_cache_path
self._warn_unsafe_extraction(extract_path)
AttributeError: ResourceManager instance has no attribute '_warn_unsafe_extraction'
<form method="post">
<table class="table table-bordered">
<th>Barcode</th>
<th>Username</th>
<th>Email Address</th>
<th>Mobile Number</th>
<th>First Name</th>
<th>Surname</th>
<th>Delate Account</th>
<div id="news_content">
</div>
<script type="text/javascript">
$.get('<?php echo base_url();?>index.php/fetch/get_news/ProthomAlo' , function(data){
$('#news_content').html(data);
})
</script>
from django import models
class MyModel(models.Model):
name = models.CharField(max_length = 100)
roll = models.CharField(max_length = 100 , null=True , blank=True)
<head></head>
<body>
<div class="row">
<div class="span9">
<div class="row">
<div class="span2">
Sidebar Left
</div>
<div class="span4">
Content Area
<head></head>
<body>
<div class="row">
<div class="col-lg-12">
<div class="row">
<div class="col-lg-4">
Sidebar Left
</div>
<div class="col-lg-6">
Content Area
def save_subscription(request):
channels=request.POST.getlist('channel_list')
user= request.user
for channel in channels:
c = Channel.objects.get(pk=channel)
c.users.add(u)
channel_list=Channel.objects.exclude(pk__in=channels)
return render(request, 'subscription/channel_subscribe.html', {'channel_list':channel_list})