Skip to content

Instantly share code, notes, and snippets.

View ekinertac's full-sized avatar
🥳

Ekin Ertaç ekinertac

🥳
View GitHub Profile
@ekinertac
ekinertac / add-apt-repository
Created October 6, 2012 02:04
add-apt-repository
#!/bin/bash
if [ $# -eq 1 ]
NM=`uname -a && date`
NAME=`echo $NM | md5sum | cut -f1 -d" "`
then
ppa_name=`echo "$1" | cut -d":" -f2 -s`
if [ -z "$ppa_name" ]
then
echo "PPA name not found"
echo "Utility to add PPA repositories in your debian machine"
@ekinertac
ekinertac / respAnim.css
Created October 13, 2012 04:02
animated responsive
.pagehead.repohead h1.private .repo-label span {
background-color:#f8eec7;
border-radius:3px;
color:#A1882B;
padding:3px 6px 2px;
}
.pagehead.repohead span.repo-label {
position:absolute;
top:14px;
@ekinertac
ekinertac / bodyclick.js
Created October 31, 2012 01:00
body click toggle
$('.plan-select').click(function(e){
$('.plan-select ul').slideUp(100);
$(this).find('ul').slideToggle(100);
$(this).toggleClass('isActive');
e.stopPropagation();
});
$('body').click(function(e){
$('.isActive').find('ul').slideToggle(100);
$('.plan-select').removeClass('isActive');
});
@ekinertac
ekinertac / mountain-lion-brew-setup.markdown
Created November 2, 2012 23:11 — forked from myobie/mountain-lion-brew-setup.markdown
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from the App Store.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.

views.py

def kalender(req,year,month):
    import calendar
    calendar = calendar.monthcalendar(int(year),int(month))
    query = EventDates.objects.filter(date__year=year,date__month=month).order_by('date')
    cal_days = []

    for cals in calendar:
@ekinertac
ekinertac / ubuntu-server-django-guide.rst
Created December 4, 2012 22:19
Ubuntu Server Setup Guide for Django Websites

Ubuntu Server Setup Guide for Django Websites

This guide is a walk-through on how to setup Ubuntu Server for hosting Django websites. The Django stack that will be used in this guide is Ubuntu_, Nginx_, Gunicorn_ and Postgres_. This stack was chosen solely from the reading I've done and talking to other Django developers in order to get their recommendations. This stack seems to be one of the latest "standard" stacks for Django deployment. This guide also assumes that you're familiar with Ubuntu server administration and Django. I needed an example site for this guide so I chose to use my Django Base Site which is available on Github.

I would also like to thank Ben Claar, Adam Fast, Jeff Triplett and Frank Wiles for their suggestions and input on this guide.

@ekinertac
ekinertac / server.sh
Last active October 16, 2016 00:28
New linux configuration
apt-get update
apt-get install build-essential \
python-dev \
libgdbm-dev \
libbz2-dev \
libc6-dev \
libsqlite3-dev \
libssl-dev \
libreadline-dev \
{% block plugin %}
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script type="text/javascript" src="/static/grappelli/js/jquery.gmaps.js"></script>
<script type="text/javascript">
var map;
if($('#id_lat').val() && $('#id_long').val()){
map = new GMaps({
div: '#map',
lat: $('#id_lat').val(),
lng: $('#id_long').val(),
@ekinertac
ekinertac / create_content_form.html
Created January 16, 2013 16:50
file input var html in içinde ona bağlıyosun, drag&drop içinde html5doctor'a vs bakabilirsin hacı ordaki açıklamalarla ikisini birbirine bağlarsın
{% extends "base.html" %}
{% block pageID %}index{% endblock pageID %}
{% block container %}
<div id="page" class="row">
{% include "includes/leftBar.html" %}
<div id="content" class="span9 block">
<form action="save" method="POST">
<ul class="formList">
@ekinertac
ekinertac / simple.jquery.plugin.js
Created February 11, 2013 04:27
Simpliest jQuery Plugin Ever
jQuery.fn.fuck = function(options){
// Setup default options
var settings = {
position: 'right bottom',
type: 'info',
content: 'some text'
};
// Override default settings
// with user provided options