Skip to content

Instantly share code, notes, and snippets.

View vigo's full-sized avatar
🕶️
I may be slow to respond.

Uğur Özyılmazel vigo

🕶️
I may be slow to respond.
View GitHub Profile
@vigo
vigo / textmate_arrange_windows.applescript
Created June 3, 2024 14:14
Arrange TextMate windows
on run
tell application "Finder"
set DesktopSize to bounds of window of desktop
set DesktopWidth to item 3 of DesktopSize
set DesktopHeight to item 4 of DesktopSize
end tell
tell application "TextMate"
activate
set WindowsList to (every window where visible is true)
@vigo
vigo / Makefile
Created October 23, 2023 18:25 — forked from LiquidityC/Makefile
Generic drop in Makefile
VERSION = \"1.0.0\"
PREFIX ?= out
INCDIR = inc
SRCDIR = src
LANG = c
OBJDIR = .obj
MODULE = binary_name
CC = gcc
@vigo
vigo / django-bash-completion.bash
Created November 30, 2022 12:56
django bash completion
# #########################################################################
# This bash script adds tab-completion feature to django-admin.py and
# manage.py.
#
# Testing it out without installing
# =================================
#
# To test out the completion without "installing" this, just run this file
# directly, like so:
#
@vigo
vigo / liste.bash
Created September 4, 2022 10:03
Pretty $PATH printer!
#!/usr/bin/env bash
#
# Created by Uğur "vigo" Özyılmazel on 2017-04-26.
# Copyright (c) 2017 VB YAZILIM. All rights reserved.
set -e
set -o pipefail
usage() {
cat <<EOF
@vigo
vigo / keybase.md
Created May 11, 2022 03:35
keybase.md

Keybase proof

I hereby claim:

  • I am vigo on github.
  • I am vigo (https://keybase.io/vigo) on keybase.
  • I have a public key whose fingerprint is 19CA CF8F 3AB4 06F6 D644 5842 D097 2B1B BE84 BBE4

To claim this, I am signing this object:

@vigo
vigo / perf-diagnostics.css
Created January 23, 2021 11:20 — forked from tkadlec/perf-diagnostics.css
CSS used to highlight potential performance issues
:root {
--violation-color: red; /* used for clear issues */
--warning-color: orange; /* used for potential issues we should look into */
}
/* IMAGES */
/*
* Lazy-Loaded Images Check
* ====
@vigo
vigo / postgres-cheatsheet.md
Created October 13, 2020 04:26 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@vigo
vigo / Rakefile
Last active November 25, 2022 06:23
Rake task örneği
task :default => [:menemen_yap]
task :menemen_yap => [:tereyag_al, :yumurta_al, :domates_al, :sivri_biber_al, :sahani_isit, :sebzeleri_pisir, :yumartayi_kir] do
puts "Menemen yapıyıyoruz"
end
task :tereyag_al => [:bakkala_git] do
puts "Tereyağı alıyoruz"
end
@vigo
vigo / admin.py
Created March 14, 2019 14:39 — forked from hakib/admin.py
How to Turn Django Admin Into a Lightweight Dashboard
# https://hakibenita.com/how-to-turn-django-admin-into-a-lightweight-dashboard
from django.contrib import admin
from django.db.models import Count, Sum, Min, Max, DateTimeField)
from django.db.models.functions import Trunc
from . import models
def get_next_in_date_hierarchy(request, date_hierarchy):