Skip to content

Instantly share code, notes, and snippets.

View molcay's full-sized avatar

M. Olcay Tercanlı molcay

View GitHub Profile
@molcay
molcay / bash_aliases
Last active October 8, 2017 10:40
My .bash_aliases File
# apt-get
alias guncelle="sudo apt-get update"
alias yukselt="sudo apt-get upgrade"
alias yukle="sudo apt-get install $@"
alias otosil="sudo apt-get autoremove"
alias sil="sudo apt-get remove $@"
alias ototemizle="sudo apt-get autoclean"
# Command
alias managepy="python3 manage.py"
@molcay
molcay / Solr Implementation.md
Last active April 19, 2017 13:16
Solr Implementation Read Me Page

Solr Implementation

Before begin, I assume you downloaded proper Solr version from web page of Solr . (For e.g: solr-6.4.1.tgz)

After that I assume you uncompress the compressed file < solr-6.4.1.tgz > and from command line you changed your current working directory to uncompressed directory < solr-6.4.1/ >.

The last step of pre-configuration is ensure that JDK 8 install correctly and java -version command return properly.

If you have done above instructions you are ready for rest part. Let's begin:

#!/bin/bash
# created by molcay.
# github.com/molcay
# I use for printing (debugging) the script
DEBUG="echo"
# Check dependencies
$DEBUG echo "Searching for dependencies..."
for depend in tar unzip nano pico vi
@molcay
molcay / cron_scr.py
Last active February 14, 2017 12:28
CRON
#!/usr/bin/python
# *-* coding: utf-8 *-*
import subprocess
import sys
# get_all_user_command = "ipa user-find"
# all_user_info = subprocess.check_output(get_all_user_command, shell=True)
@molcay
molcay / scr.py
Last active February 8, 2017 18:26
Extract information from csv
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os, sys, subprocess
# Constant
INPUT_DIR = "input"
ACCEPTED_FILE_FORMAT = ["csv", "txt", "list"]
def asciify(string):
@molcay
molcay / Assignment6 C (R26-R27).md
Last active December 28, 2016 12:57
Assignment 06 C Part Configuration Commands

Assginment6 C

  • R26 and 2R7 configuration for 15 (SSH enabling).
    enable
    conf t
    username admin privilege 15 secret netseclab
    aaa new-model
    aaa authentication login default local
    enable secret netseclab
    service password-encryption
    
@molcay
molcay / Django Cheatsheet.md
Last active December 28, 2016 07:51
Django Framework Development Notes

Django Notes

managepy equivalence python manage.py

  • Install and Create virtualenv
sudo apt-get install python3-venv
python3 -m venv myvenv
  • Activate the virtualenv
@molcay
molcay / list_iterations.py
Created December 20, 2016 19:36
Iterate over list in Python
list_to_iter = [ ["a", "b"], ["c", "d"], ["e", "f"] ]
for item in list_to_iter:
print(item)
for i in range(len(list_to_iter)):
print(list_to_iter[i])
for (i, item) in enumerate(list_to_iter):
@molcay
molcay / CommandListR26(Muhammed Olcay TERCANLI).md
Last active December 23, 2016 09:16
Assignment 06 B Part Configuration Commands

Assignment 06 B

Routing with OSPF and RIPv2

In R26:

After establishing the connection:

enable
conf t

int gig 5/0
@molcay
molcay / OSPF 2.md
Last active December 15, 2016 18:51
Advanced Network Course: Switching & Routing

R1

enable
conf t

router ospf 10 
network 192.168.1.0 0.0.0.255 area 0
network 192.168.12.0 0.0.0.3 area 0
network 192.168.13.0 0.0.0.3 area 0
end