Skip to content

Instantly share code, notes, and snippets.

@kzorluoglu
kzorluoglu / README.md
Last active January 12, 2022 22:37 — forked from gjreasoner/README.md
Expand Ubuntu 20 Proxmox Disk - Updated 12.01.2022
# Resize the file system in UI, under VM -> Hardware -> Click on the disk to resize, click "Resize disk" button

# Confirm increase in disk space (1TB in my case)
$ lsblk
NAME                      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                         8:0    0    1T  0 disk
├─sda1                      8:1    0    1M  0 part
├─sda2                      8:2    0    1G  0 part /boot
└─sda3                      8:3    0    1T  0 part
@kzorluoglu
kzorluoglu / webpack.development.config.js
Created May 17, 2021 15:10
webpack.config.js for Chameleon 7.1.x with Vue.js
const VueLoaderPlugin = require('vue-loader/lib/plugin');
const webpack = require('webpack');
const path = require('path');
module.exports = {
entry: './assets/main.js',
watchOptions: {
ignored: '**/node_modules',
},
module: {
@kzorluoglu
kzorluoglu / project.txt
Created February 5, 2020 14:11
Standard Project Information Save
Projekt: [ project.com, subdomain.project.com ]
[] Account Hosting & Domain
Account: example.com
Passwort: examplepass
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[] Web
[] [] DEV
Url: dev.project.com
[] [] LIVE
@kzorluoglu
kzorluoglu / last12months.php
Last active February 3, 2020 11:09
PHP - Get Last 12 Months from Now
<?php
$to = new DateTime('now');
$from = new DateTime('now');
$from->modify("-12 months");
$interval = DateInterval::createFromDateString('1 month');
$period = new DatePeriod($from, $interval, $to);
$res = array();
foreach ($period as $start)
{
@kzorluoglu
kzorluoglu / DHL Express REST API Example Request
Created September 3, 2019 16:02
DHL Express REST API Example Request
{
"ShipmentRequest": {
"RequestedShipment": {
"ShipmentInfo": {
"DropOffType": "REGULAR_PICKUP",
"ServiceType": "P",
"Account": 143816942,
"Currency": "SGD",
"UnitOfMeasurement": "SI"
},
@kzorluoglu
kzorluoglu / .gitlab-ci.yml
Created February 4, 2019 16:03 — forked from vojtasvoboda/.gitlab-ci.yml
GitLab CI FTP deploy with mwienk/docker-lftp docker image
stages:
- test
- deploy
cache:
paths:
- vendor
# test job
test:
@kzorluoglu
kzorluoglu / SqliteStorage.php
Created August 11, 2017 22:57
PHP - PDO Fetch All Objects with Model Class
$query = $this->db->query('SELECT * FROM '.$this->table);
$result = $query->fetchAll(\PDO::FETCH_CLASS, 'Your\\Namespace\\andClassName');
return $result;
@kzorluoglu
kzorluoglu / BodyguardViewController.swift
Last active July 7, 2017 09:40
Capture Photo from Camera Preview Layer Swift 3
//
// BodyguardViewController.swift
// My Mobile Bodyguard
//
// Created by Koray Zorluoglu on 06.07.17.
// Copyright © 2017 Koray Zorluoglu. All rights reserved.
//
import UIKit
import AVFoundation
@kzorluoglu
kzorluoglu / laravel.js
Created January 9, 2017 08:22 — forked from soufianeEL/laravel.js
You use Laravel 5 and you want to send a DELETE request without creating a form? This will handle the form-creation bits for you dynamically, similar to the Rails implementation. To use, import script, and create a link with the `data-method="DELETE"` and `data-token="{{csrf_token()}}"` attributes.
/*
Exemples :
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}">
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}" data-confirm="Are you sure?">
*/
(function() {
#!/usr/bin/env bash
# Use single quotes instead of double quotes to make it work with special-character passwords
PASSWORD='PASSWORDHERE'
PROJECTFOLDER='PROJECTFOLDERHERE'
# create project folder
sudo mkdir "/var/www/html/${PROJECTFOLDER}"
# update / upgrade