Skip to content

Instantly share code, notes, and snippets.

View NearHuscarl's full-sized avatar
🏚️

Near Huscarl NearHuscarl

🏚️
View GitHub Profile
@NearHuscarl
NearHuscarl / bash-colors.md
Created September 4, 2017 17:10 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@NearHuscarl
NearHuscarl / rofi-emoji.sh
Last active June 14, 2024 16:40 — forked from tadly/rofi-emoji.sh
Rofi emoji picker
#!/usr/bin/env bash
# Source: https://gist.github.com/Tadly/0741821d3694deaec1ee454a95c591fa
#
# Use rofi to pick emoji because that's what this
# century is about apparently...
#
# Requirements:
# rofi, xsel, xdotool, curl, xmllint
#
# Usage:
@NearHuscarl
NearHuscarl / main.dart
Last active April 9, 2021 03:00 — forked from devoncarew/main.dart
54898767/enumerate-or-map-through-a-list-with-index-and-value-in-dart
// https://gist.github.com/NearHuscarl/86ce74d95798635e14c8b848863b429f
extension ExtendedIterable<E> on Iterable<E> {
/// Like Iterable<T>.map but callback have index as second argument
Iterable<T> mapIndexed<T>(T Function(E e, int i) f) {
var i = 0;
return map((e) => f(e, i++));
}
void forEachIndexed(void Function(E e, int i) f) {
@NearHuscarl
NearHuscarl / main.dart
Last active March 7, 2021 07:58 — forked from jcollins-g/index.html
58517331/how-to-add-a-button-with-icon-in-flutter-app
// https://gist.github.com/NearHuscarl/6e8c4dff9ebaabf2980ae05fee8ae109
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(