Skip to content

Instantly share code, notes, and snippets.

sshfs ubuntu@ip:/home/ubuntu/des /home/yusuf/Documents/des1 -oIdentityFile=/home/yusuf/Desktop/ohio.pem
@cozingo
cozingo / eloquent
Created March 31, 2021 07:39
hasOne & belongsTo
-------- -----------
- User - - Phone -
-------- -----------
- - - user_id -
-------- -----------
user->hasOne(phone)
phone->belongsTo(user)
@cozingo
cozingo / su.txt
Last active March 25, 2021 10:30
run terminal as www-data
sudo su -l www-data -s /bin/bash
@cozingo
cozingo / mate-better
Last active February 24, 2021 13:09
rdp
https://gitlab.com/Remmina/Remmina/-/issues/1584
Resolution: Custom 1280x960
Color depth: High Color(16 bpp)
@cozingo
cozingo / ssl-localhost1.txt
Last active February 24, 2021 12:56
ssl-localhost
https://medium.com/internshala-tech/adding-self-trusted-ssl-certificate-for-localhost-on-ubuntu-nginx-c66d70b22e4b
@cozingo
cozingo / lsof
Created January 14, 2021 10:34
process using port
lsof -i :8000
@cozingo
cozingo / 101.go
Last active November 18, 2022 15:31
go basic
f := "apple"
//is same as
var f = "apple"
//is same as
var f string = "apple"
operators : &&, ||
Closure
func intSeq() func() int {
@cozingo
cozingo / systemctl.sh
Created September 9, 2020 07:20
ubuntu services autostart
sudo systemctl is-enabled apache2
sudo systemctl is-active apache2
sudo systemctl enable apache2
sudo systemctl disable apache2
@cozingo
cozingo / git-reset.txt
Created August 26, 2020 06:47
git reset
changes stage changes files should be careful
1. reset --soft нет нет нет
2. reset [--mixed] да нет нет
3. reset --hard да да да
@cozingo
cozingo / relhasoids.php
Last active August 20, 2020 08:50
postgre
edit /usr/share/phppgadmin/classes/database/Postgres.php
comment this on line 1045:
$sql = "SELECT relhasoids FROM pg_catalog.pg_class WHERE relname='{$table}'
AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname='{$c_schema}')";
$rs = $this->selectSet($sql);
if ($rs->recordCount() != 1) return null;
else {