Skip to content

Instantly share code, notes, and snippets.

View molcay's full-sized avatar

M. Olcay Tercanlı molcay

View GitHub Profile
@molcay
molcay / Dna2Protein.pl
Last active May 6, 2019 15:49
Perl Notes
my $DNA = <STDIN>;
chomp $DNA;
$protein = myfunc2($DNA);
print "Protein Sequence:\n";
print($protein, "\n");
sub myfunc2 {
my %aacode = (
TTT => "F", TTC => "F", TTA => "L", TTG => "L",
@molcay
molcay / install_themes.sh
Created November 25, 2016 12:30
Themes from Noobslab.com
#!/bin/bash
sudo add-apt-repository ppa:noobslab/themes
sudo add-apt-repository ppa:noobslab/icons
sudo add-apt-repository ppa:ravefinity-project/ppa
sudo add-apt-repository ppa:snwh/pulp
sudo apt-get update
sudo apt-get install humanitary-gtk-theme
sudo apt-get install humanitary-icon-theme
@molcay
molcay / create_ap.md
Last active November 29, 2019 06:40
The basic installation script with dependencies for 'create_ap'

Install create_ap

Basic installation script for create_ap

Usage (Script):

  1. Save the install_create_ap.sh file in your system (for example /home folder).
  • Give the execute permission to the file:
    • chmod +x install_create_ap.sh
  • Run the script:
  • ./install_create_ap.sh
@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
@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 / 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 / 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 / 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 / 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 / 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)