Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Ghostish's full-sized avatar
🎯
Focusing

Chaoda Zheng Ghostish

🎯
Focusing
View GitHub Profile
@pdanford
pdanford / README.md
Last active April 13, 2024 18:19
Launching iTerm2 from macOS Finder

Launching iTerm2 from macOS Finder

(Based on info from Peter Downs' gitub but with modified behavior to open a new terminal window for each invocation instead of reusing an already open window.)

The following three ways to launch an iTerm2 window from Finder have been tested on iTerm2 version 3+ running on macOS Mojave+.

pdanford - April 2020


@wachunei
wachunei / numeric_for_django_templates.html
Last active October 27, 2022 13:41
Numeric for loop in Django Templates
<!-- Iterate N times (replace N with a number -->
{% for i in "x"|ljust:"N" %}
<!-- Access numeric variable (0-based index) -->
{{ forloop.counter0 }}
<!-- Access numeric variable (1-based index) -->
{{ forloop.counter }}
{% endfor %}
<!-- For example, iterate from 0 to 3 -->
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@meoyawn
meoyawn / EmptyRecyclerView.java
Created November 1, 2014 11:20
RecyclerView doesn't have an emptyView support, we gotta fix that
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.View;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class EmptyRecyclerView extends RecyclerView {
@Nullable View emptyView;
@gabrielemariotti
gabrielemariotti / Readme.md
Last active March 2, 2024 23:10
A SimpleSectionedRecyclerViewAdapter: use this class to realize a simple sectioned `RecyclerView.Adapter`.

You can use this class to realize a simple sectioned RecyclerView.Adapter without changing your code.

The RecyclerView should use a LinearLayoutManager. You can use this code also with the TwoWayView with the ListLayoutManager (https://github.com/lucasr/twoway-view)

This is a porting of the class SimpleSectionedListAdapter provided by Google

Screen

Example:

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: