Skip to content

Instantly share code, notes, and snippets.

View balthild's full-sized avatar
😢
Depression

Balthild balthild

😢
Depression
View GitHub Profile
@maxkatz6
maxkatz6 / AddClassBehavior.cs
Last active February 15, 2021 21:17
AddClassBehavior
public class AddClassBehavior : AvaloniaObject, IBehavior
{
public IAvaloniaObject AssociatedObject { get; private set; }
public string Class
{
get => GetValue(ClassProperty);
set => SetValue(ClassProperty, value);
}
@benstockdesign
benstockdesign / nscollectionview-how-to.markdown
Last active May 19, 2019 15:14
How to Set Up an NSCollectionView in Xcode 7.3 (OS X 10.11)

Think NSCollectionViews are Crazy to Set Up for OS X?

You're Not Alone.

Here's a step-by-step guide on how to get these painful things working properly in Xcode 7.3 on OS X 10.11 El Capitan.

  1. Drag an NSCollectionView object into an existing storyboard or standalone nib.
  2. Select the NSCollectionView, and in the inspector, change Layout from Content Array (Legacy) to Flow.
  3. Configure the rest how you see fit.
  4. Next, add a new NSCollectionViewItem subclass to the project, naming it something like MyCollectionViewItem.
  5. Check the box next to Also create XIB file for user interface. Two files will be created.
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 17, 2024 12:37
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@alana-mullen
alana-mullen / Detect the last post in the WordPress loop
Last active May 29, 2023 16:50
Detect the last post in the WordPress loop
<?php if (($wp_query->current_post +1) == ($wp_query->post_count)) {
echo 'This is the last post';
} ?>
<?php if (($wp_query->current_post +1) != ($wp_query->post_count)) {
echo 'This is the not the last post';
} ?>
@baopham
baopham / Monaco for Powerline.otf
Last active April 16, 2023 03:57
Patched font Monaco for OSX Vim-Powerline