Skip to content

Instantly share code, notes, and snippets.

View kazimolmez's full-sized avatar
🏠
Working from home

Kazım Ölmez kazimolmez

🏠
Working from home
View GitHub Profile
#!/bin/bash
set -e
echo "======================================"
echo " Photoshop CS6 Wine Installer (STABLE)"
echo "======================================"
# -------------------------
# PARAM CONTROL
@kazimolmez
kazimolmez / gist:e21756bcba57e74b1cf145df0abbaa27
Created March 7, 2026 00:01 — forked from gulbaki/gist:a64010915eccda2ccaa527199bcfd323
Claude Code’un arkasındaki ekipten paylaşılan gerçek kullanım alışkanlıkları bir araya getirilmiş ve tek bir dosyada toplanmış: CLAUDE.md
# Workflow Orchestration
## 1. Plan Mode Default
- Enter plan mode for ANY non-trivial task (3+ steps or architectural decisions)
- If something goes sideways, STOP and re-plan immediately — don't keep pushing
- Use plan mode for verification steps, not just building
- Write detailed specs upfront to reduce ambiguity
## 2. Subagent Strategy
sudo apt install ffmpeg
mkdir optimized
for file in *.mp4; do
ffmpeg -i "$file" -vcodec libx264 -acodec aac -b:v 800k -b:a 96k -vf "scale=1280:-2" "optimized/${file%.mp4}.mp4"
done
sudo apt install imagemagick jpegoptim
mkdir optimized
for img in *.jpg; do
convert "$img" -resize 1200x "optimized/$img"
jpegoptim --max=90 --strip-all "optimized/$img"
done
@kazimolmez
kazimolmez / index.js
Created June 25, 2023 01:17 — forked from soullivaneuh/index.js
Prevent PageUp and PageDown press in textarea moving website out of the window
// @see http://www.competa.com/blog/chrome-bug-pageup-pagedown-textarea-moves-website-window/
// @see https://bugs.chromium.org/p/chromium/issues/detail?id=890248
document.querySelector('textarea').addEventListener('keydown', event => {
if (event.key === 'PageUp' || event.key === 'PageDown') {
const cursorPosition = event.key === 'PageUp' ? 0 : event.target.textLength;
event.preventDefault();
event.target.setSelectionRange(cursorPosition, cursorPosition);
}
});
@kazimolmez
kazimolmez / AdobeAMDFix.md
Created January 1, 2021 07:35 — forked from naveenkrdy/AdobeAMDFix.md
To fix adobe products crashes on AMD hackintosh

Adobe Crash Fix XLNC

Instructions

  1. Install needed adobe apps from adobe creative cloud.

  2. Open Terminal.

  3. Copy-paste the below command to your terminal and run it (enter password if asked).

!function(){"use strict";function e(e){try{if("undefined"==typeof console)return;"error"in console?console.error(e):console.log(e)}catch(e){}}function t(e){return d.innerHTML='<a href="'+e.replace(/"/g,"&quot;")+'"></a>',d.childNodes[0].getAttribute("href")||""}function r(e,t){var r=e.substr(t,2);return parseInt(r,16)}function n(n,c){for(var o="",a=r(n,c),i=c+2;i<n.length;i+=2){var l=r(n,i)^a;o+=String.fromCharCode(l)}try{o=decodeURIComponent(escape(o))}catch(u){e(u)}return t(o)}function c(t){for(var r=t.querySelectorAll("a"),c=0;c<r.length;c++)try{var o=r[c],a=o.href.indexOf(l);a>-1&&(o.href="mailto:"+n(o.href,a+l.length))}catch(i){e(i)}}function o(t){for(var r=t.querySelectorAll(u),c=0;c<r.length;c++)try{var o=r[c],a=o.parentNode,i=o.getAttribute(f);if(i){var l=n(i,0),d=document.createTextNode(l);a.replaceChild(d,o)}}catch(h){e(h)}}function a(t){for(var r=t.querySelectorAll("template"),n=0;n<r.length;n++)try{i(r[n].content)}catch(c){e(c)}}function i(t){try{c(t),o(t),a(t)}catch(r){e(r)}}var l="/cdn-cgi/l/ema
function formatSizeUnits($bytes)
{
if ($bytes >= 1073741824)
{
$bytes = number_format($bytes / 1073741824, 2) . ' GB';
}
elseif ($bytes >= 1048576)
{
$bytes = number_format($bytes / 1048576, 2) . ' MB';
}
@kazimolmez
kazimolmez / PHP text size to byte
Created July 26, 2019 07:10
PHP text size to byte
function strBytes($str){
// STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT
// Number of characters in string
$strlen_var = strlen($str);
// string bytes counter
$d = 0;
@kazimolmez
kazimolmez / filesize.php
Last active July 7, 2019 21:53
Php file size format
function formatBytes($bytes, $precision = 2) {
$units = array("b", "kb", "mb", "gb", "tb");
$bytes = max($bytes, 0);
$pow = floor(($bytes ? log($bytes) : 0) / log(1024));
$pow = min($pow, count($units) - 1);
$bytes /= (1 << (10 * $pow));
return round($bytes, $precision) . " " . $units[$pow];