Skip to content

Instantly share code, notes, and snippets.

@danyreyna
danyreyna / SettingupPGPandGit.md
Created February 3, 2025 03:15 — forked from simongle/SettingupPGPandGit.md
A guide for PGP and Git

Setting up PGP with Git

#PGP

If you are reading this, you have taken the first step towards encryption self-righteousness. The steps below are my preferred method for configuration after years of suffering through alternative, more archaic/byzantine steps.

Note, if you already have a PGP key, skip to step #4. Second note: I know UNIX best, so I’m not going to embarrass myself by attempting to write a windows guide. The good people over at EFF have your back: How to: Use PGP for Windows | Surveillance Self-Defense

[A point of clarification: PGP stands for pretty good privacy and is the original underlying protocol, GPG stands for Gnu Privacy Guard, and is an open source program that is compliant with PGP; the two acronyms are often used interchangeably.]

  1. Download your GPG client
@danyreyna
danyreyna / focus-input-element-component.html
Created October 4, 2024 22:26 — forked from wildlarva/focus-input-element-component.html
Focus conditional input element on Angular
<div *ngFor="let task of tasks">
<!-- Use # to set the name of the input element to focus -->
<input #taskInput *ngIf="task.isEditing" type="text" [(ngModel)]="task.name" (blur)="onEdited(task)" (keyup.enter)="taskInput.blur()">
<div *ngIf="!task.isEditing" (dblclick)="onEdit(task)">{{task.name}}</div>
</div>
@danyreyna
danyreyna / README.MD
Created August 31, 2024 01:51 — forked from lmarkus/README.MD
Extracting / Exporting custom emoji from Slack

Extracting Emoji From Slack!

Slack doesn't provide an easy way to extract custom emoji from a team. (Especially teams with thousands of custom emoji) This Gist walks you through a relatively simple approach to get your emoji out.

If you're an admin of your own team, you can get the list of emoji directly using this API: https://api.slack.com/methods/emoji.list. Once you have it, skip to Step 3

HOWEVER! This gist is intended for people who don't have admin access, nor access tokens for using that list.

Follow along...

@danyreyna
danyreyna / main.dart
Created July 18, 2023 01:53 — forked from asserty308/main.dart
Flutter: Rounded top borders on scaffold body
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@danyreyna
danyreyna / analysis_options.yaml
Created July 10, 2023 03:33 — forked from rydmike/analysis_options.yaml
RydMike lints v2.0.1 - Personal preferences and my starting point for my Dart & Flutter linter rules setup
# RydMike LINTER Preferences v2.0.1
#
# Get this file here: https://gist.github.com/rydmike/fdb53ddd933c37d20e6f3188a936cd4c
#
# We include and activate all lint rules, later below we disable the not used or desired ones.
# You can find a list of all lint rules to put in your all_lint_rules.yaml file here:
# https://dart-lang.github.io/linter/lints/options/options.html
#
# For a full comparison of all lint rules settings in rule styles listed below, please see this
# sheet: https://docs.google.com/spreadsheets/d/1Nc1gFjmCOMubWZD7f2E4fLhWN7LYaOE__tsA7bf2NjA
@danyreyna
danyreyna / benchmark_attribute_access.py
Created February 14, 2023 21:30 — forked from wolph/benchmark_attribute_access.py
Benchmark namedtuple vs dataclass vs dict
import sys
import enum
import math
import random
import timeit
import typing
import dataclasses
import collections

How to setup a practically free CDN using Backblaze B2 and Cloudflare

⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,

@danyreyna
danyreyna / NSwagCommands.md
Created November 9, 2022 04:08 — forked from stevetalkscode/NSwagCommands.md
NSwag Commands for use with OpenApiReference Options element
Command Value Type Default Value Description
Namespace string "MyNamespace" The namespace to use on the generated classes for the generated client class
AdditionalNamespaceUsages string[] Empty Array Additional namespaces to include in using directives for the client
@danyreyna
danyreyna / cloudSettings
Last active October 30, 2021 20:30
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-10-30T20:29:51.916Z","extensionVersion":"v3.4.3"}