Skip to content

Instantly share code, notes, and snippets.

View ekinertac's full-sized avatar
🥳

Ekin Ertaç ekinertac

🥳
View GitHub Profile
@ekinertac
ekinertac / bower.py
Last active August 29, 2015 14:01
Django custom template tag for bower.js
import json
import os
from classytags.arguments import Argument
from classytags.core import Tag, Options
from django import template
from django.conf import settings
register = template.Library()
@ekinertac
ekinertac / gist:edd241e35fbdb076574b
Created May 4, 2015 12:13
deferred angular request
params.callback = 'JSON_CALLBACK';
// Create promise
var deffered = $q.defer();
// Do request
$http({
method: 'JSONP',
url: 'http://www.example.com/rest-api',
@ekinertac
ekinertac / Comments.md
Last active August 29, 2015 14:27
FF Feature List

Comments Control

  • Create

    • should create a comment with a valid user
    • should not create a comment for an invalid user
    • should not create a comment for an invalid post in a group
    • should not update group's last activity
  • Update

    • should update a comment with a valid user
  • should not update a comment with a invalid user

@ekinertac
ekinertac / ftp.py
Created October 1, 2015 12:19
Temporary FTP Server
#!/usr/bin/env python
# ftpserver-cli.py
import sys
sys.path.append("/home/ekinertac") # enter your proper path here
import argparse
from pyftpdlib.authorizers import DummyAuthorizer
from pyftpdlib.handlers import FTPHandler
from pyftpdlib.servers import FTPServer
@ekinertac
ekinertac / jquery_rotate.html
Created March 30, 2012 22:59
jQuery / CSS rotation on click
<html>
<head>
<link href="test2.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
</head>
<body onclick="Spin()">
<div class="helpTip">
<h2>Click Anywhere</h2>
<div>to start</div>
{
"files":
{
"CodeIgniter Install": "https://raw.github.com/ekinertac/ci_res/master/files/install.php",
"Reset CSS": "http://meyerweb.com/eric/tools/css/reset/reset.css",
"jQuery": "https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js",
"jQuery UI": "https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js",
"less.js": "http://lesscss.googlecode.com/files/less-1.3.0.min.js",
"markdown.css": "http://cdn.bitbucket.org/kevinburke/markdowncss/downloads/markdown.css"
},
@ekinertac
ekinertac / jQueryDock
Created April 26, 2012 15:27
jQuery dock plugin
function distance(x0, y0, x1, y1) {
var xDiff = x1-x0;
var yDiff = y1-y0;
return Math.sqrt(xDiff*xDiff + yDiff*yDiff);
}
asdasdasd $(document).ready(function() {
var proximity = 180;
var iconSmall = 48, iconLarge = 128; //css also needs changing to compensate with size
@ekinertac
ekinertac / tacirnet_filemanager.js
Created April 30, 2012 15:29
Tacirnet Filemanager Javascript Codes
var protocol = window.location.protocol,
domain = window.location.hostname,
filePath = protocol + '//' + domain + '/admin/tacir-filemanager-git/',
deletePath = protocol + '//' + domain + '/admin/tacir-filemanager-sil/',
createFolderPath = protocol + '//' + domain + '/admin/tacir-filemanager/tacir-filemanager-yeniklasor/',
renamePath = protocol + '//' + domain + '/admin/tacir-filemanager-isimdegistir/';
function getFolder(folderPath){
if(!folderPath){
@ekinertac
ekinertac / win7boot.bat
Created May 22, 2012 21:14
Create Bootable Thumb-Drive from windows(cmd)
$ diskpart
$ list disk
select disk 2 # write your own disk number
clean # this will delete disk's partitions
create partition primary size=1000 # write disk size in MegaBytes)
select partition 1 # select parition you just created
active # set active partition
format fs=fat32 quick # quick format with fat32 file system (fat32/extFat/NTFS)
assign # mount the disk
@ekinertac
ekinertac / icoMoon.html
Created May 23, 2012 11:40
Ico Moon Usage
<!-- Don't Forget Add font files to your document folder -->
<!-- Add Stylesheet to document -->
<link rel="stylesheet" href="icoMoon.css"/>
<!-- and HTML Magic -->
<i class="icon home"></i>
<!-- that's it -->