Skip to content

Instantly share code, notes, and snippets.

View yalin's full-sized avatar
✴️

Yalin Aydin yalin

✴️
  • Kingston, ON, Canada
  • X @yalin
View GitHub Profile
@yalin
yalin / index.html
Created February 3, 2021 10:58
simple-bootstrap-starterpage
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title>Hello World</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
</head>
@yalin
yalin / digitalocean.md
Created February 27, 2021 06:09
ssh after digital ocean droplet
  1. Create your local ssh key using ssh-keygen
  2. Copy ~/.ssh/id_rsa.pub to digital ocean my profile > security
  3. Create droplet with added ssh key
  4. Droplet dashboard > Access > Reset root password
  5. Email will come with root password
  6. Droplet dashboard; on right top there is "Console" to server
  7. Enter the root password you copied from e-mail
  8. Create a new password
  9. Local terminal; ssh-copy-id -i id_rsa.pub YOUR_SERVER_IP creates known hosts file under .ssh/
  10. If ssh key correct you can continue, if not;
@yalin
yalin / XamppCI4.md
Created March 8, 2021 06:25
Xampp and CodeIgniter 4
  • Install xampp
  • Download CodeIgniter (lets say ~/folder/)
  • edit /opt/lampp/etc/httpd.conf
  • replace line
    • DocumentRoot "/opt/lampp/htdocs" with
    • DocumentRoot "your_path"
    • And change line
    • Directory "/opt/lampp/htdocs" with
    • Directory "your_path"
  • Restart apache
@yalin
yalin / argparser.py
Last active March 13, 2021 14:29
Python argparser init
# argprase library that will help us to deal with arguments
import argparse
import sys
myParser = argparse.ArgumentParser(description='Definition of the python file')
myParser.add_argument('mandatory',
type=str,
help='Mandatory argument')
myParser.add_argument('--optional', '-o',
@yalin
yalin / .env
Last active March 21, 2021 12:34
default Code Igniter 4 env file
#--------------------------------------------------------------------
# Example Environment Configuration file
#
# This file can be used as a starting point for your own
# custom .env files, and contains most of the possible settings
# available in a default install.
#
# By default, all of the settings are commented out. If you want
# to override the setting, you must un-comment it by removing the '#'
# at the beginning of the line.
edit;
* postgresql.conf
* pg_hba.conf
cd /etc/postgresql/12/main (Linux)
### postgresql.conf
set listen_addresses = '*'
### pg_hba.conf
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 470.57.01
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"
EndSection
'Fira Code', 'ui-monospace', 'SFMono-Regular' , 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'monospace', 'Monospace','Courier New'
@yalin
yalin / Pop OS VSCode Theme Colors
Created November 23, 2022 16:18
Pop OS VSCode Theme Colors
"workbench.colorCustomizations": {
"editor.background": "#4d4643",
"editor.foreground": "#d4d4d4",
"activityBar.background": "#272321",
"activityBar.foreground": "#d4d4d4",
"activityBarBadge.background": "#009688",
"sideBarTitle.foreground": "#bbbbbb",
"sideBar.background": "#443d3a",
"sideBarSectionHeader.foreground": "#faa41a",
"sideBarSectionHeader.background": "#272321",
import datetime
import os
import jwt
from dotenv import load_dotenv
load_dotenv() # take environment variables from .env.
secret_key = os.getenv("TOKEN_SECRET_KEY")