Skip to content

Instantly share code, notes, and snippets.

View aral's full-sized avatar

Aral Balkan aral

View GitHub Profile
@aral
aral / wezterm.lua
Created April 17, 2023 15:42
WezTerm configuration
local wezterm = require 'wezterm'
wezterm.on('format-window-title', function(tab, pane, tabs, panes, config)
local zoomed = ' 🗗 '
if tab.active_pane.is_zoomed then
zoomed = ' 🗖 '
end
local index = ''
if #tabs > 1 then
@aral
aral / whatdb-proposed-syntax.md
Last active May 31, 2023 13:16
WhatDB? Proposed syntax.

WhatDB?

Proposed syntax.

Preparing a query

Internally, this prepares the predicate for an array.filter() operation.

.where( propertyName ) : Start query. Returns query object.
@aral
aral / TextViewPinchToZoom
Created May 11, 2011 10:36
How to use add pinch-to-zoom to a TextView
// Create a pinch gesture recognizer instance.
self.pinchGestureRecognizer = [[[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(pinchGesture:)] autorelease];
// And add it to your text view.
[self.myTextView addGestureRecognizer:self.pinchGestureRecognizer];
// ...
- (void)pinchGesture:(UIPinchGestureRecognizer *)gestureRecognizer
{
@aral
aral / pencil-light.kdl
Last active February 10, 2023 18:12
Pencil Light theme for the Zellij terminal workspace/multiplexer
themes {
pencil-light {
fg "#005F87"
bg "#f1f1f1"
black "#f1f1f1"
red "#B6D6FD"
green "#10A778"
yellow "#A89C14"
blue "#008EC4"
magenta "#B6D6FD"
@aral
aral / highlights.scm
Created September 2, 2022 09:57
Kitten runtime queries for Helix Editor
; inherits: javascript
; Highlight component names differently
(jsx_opening_element ((identifier) @constructor
(#match? @constructor "^[A-Z]")))
; Handle the dot operator effectively - <My.Component>
(jsx_opening_element ((nested_identifier (identifier) @tag (identifier) @constructor)))
(jsx_closing_element ((identifier) @constructor
const express = require('express');
const htm = require('htm');
const vhtml = require('vhtml');
// create an html`` tag function for vhtml:
const html = htm.bind(vhtml);
const App = (props) => html`
<div class="app">
<h1>This is an app</h1>
@aral
aral / simple
Created June 5, 2012 07:31
A simple shiny CSS rounded button
/*
Apply to a <button>
Just playing, during Lea Verou's CSS3 workshop at NDC Oslo.
Released under the MIT License. http://en.wikipedia.org/wiki/MIT_License
*/
font-size:1em;
border-radius: 1em;
text-shadow: 1px 1px 0 hsla(0, 0%, 100%, 0.5);
[user]
name = Aral Balkan
email = mail@ar.al
[core]
pager = cat
[diff]
tool = meld
@aral
aral / config.toml
Created April 30, 2022 12:29
Helix Editor configuration
theme = "dracula"
[editor]
scroll-lines = 1
idle-timeout = 0
[editor.cursor-shape]
insert = "bar"
[keys.insert]
@aral
aral / 00_readme.md
Last active April 28, 2022 14:29
My fish shell configuration files

Instructions

Install plugins using Fisher.

Tide prompt customisation

Replace .config/fish/functions/_tide_item_git.fish with the file here to use words instead of symbols to describe git repository state.