Skip to content

Instantly share code, notes, and snippets.

View omgbbqhaxx's full-sized avatar
🪐
Universal

Yasin Aktimur omgbbqhaxx

🪐
Universal
View GitHub Profile
@omgbbqhaxx
omgbbqhaxx / gist:9290573
Last active August 29, 2015 13:56 — forked from rolo/gist:1481128
#!/bin/bash
#http://postgis.net/source
# Install Postgres 9.1, PostGIS and create PostGIS template on a clean Ubuntu 11.10 Oneiric Ocelot box
# http://wildfish.com
-*-*-*-*-*-*-
sudo apt-get install libpq-dev python-dev
sudo apt-get install postgresql postgresql-contrib
sudo apt-get install build-essential
sudo apt-get -y install python-software-properties
@omgbbqhaxx
omgbbqhaxx / map.txt
Last active August 29, 2015 13:57
Customsize Map Example.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>Google Maps Multiple Markers</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://maps.google.com/maps/api/js?sensor=false"
type="text/javascript"></script>
</head>
<body>
<!doctype html>
<html>
<head>
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?sensor=false">
</script>
<meta charset="UTF-8">
<title>Example Google Map</title>
</head>
<body>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
<title>Rich Marker - Click Event</title>
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
<!--<script src="./richmarker.js" type="text/javascript" charset="iso-8859-1"></script>-->
<script src="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/richmarker/src/richmarker.js" type="text/javascript" charset="iso-8859-1"></script>
<style>
div.richMarkerDiv {
@omgbbqhaxx
omgbbqhaxx / appdelegate.h
Created August 21, 2014 13:05
Login withfacebook custom
//
// AppDelegate.h
// CustomFBLogin
//
// Created by Yasin Aktimur on 19.08.2014.
// Copyright (c) 2014 Yasin Aktimur. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "ViewController.h"

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for Google TV

Consumer key: iAtYJ4HpUVfIUoNnif1DA

- (NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewRowAction *moreAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"More" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
// show UIActionSheet
}];
moreAction.backgroundColor = [UIColor greenColor];
UITableViewRowAction *flagAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Flag" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
// flag the row
}];
from django.contrib.sessions.backends.base import SessionBase, CreateError
from django.conf import settings
from django.utils.encoding import force_unicode
import redis
class SessionStore(SessionBase):
""" Redis store for sessions"""
def __init__(self, session_key=None):
self.redis = redis.Redis(
[unix_http_server]
file=/tmp/supervisor.sock ; path to your socket file
[supervisord]
logfile=/opt/venv/bin/logs/supervisord.log ; supervisord log file
logfile_maxbytes=50MB ; maximum size of logfile before rotation
logfile_backups=10 ; number of backed up logfiles
loglevel=error ; info, debug, warn, trace
pidfile=/var/run/supervisord.pid ; pidfile location
nodaemon=false ; run supervisord as a daemon
@omgbbqhaxx
omgbbqhaxx / geodjango
Last active August 29, 2015 14:21
Geodjango installation steps.
#!/bin/bash
#http://postgis.net/source
# Install Postgres 9.4, PostGIS and create PostGIS template on a clean Ubuntu
# Yasin Aktimur
#First steps
-*-*-*-*-*-*-
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install vim
sudo apt-get install python-dev