Skip to content

Instantly share code, notes, and snippets.

View eduuh's full-sized avatar
🎯

dushg eduuh

🎯
  • Nairobi
  • 05:35 (UTC +03:00)
View GitHub Profile
@eduuh
eduuh / program.cs
Last active November 8, 2019 05:23
Migrate the database automatically to the latest Migrations
public static void Main(string[] args)
{
var host = CreateWebHostBuilder(args).Build();
using (var scope = host.Services.CreateScope())
{
var Services = scope.ServiceProvider;
try
{
var context = Services.GetRequiredService<DataContext>();
@eduuh
eduuh / README-Template.md
Created November 10, 2019 03:39 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

{"lastUpload":"2020-07-26T00:18:46.167Z","extensionVersion":"v3.4.3"}
@eduuh
eduuh / zshrc
Created February 15, 2020 22:55 — forked from aquaductape/zshrc
# Luke's config for the Zoomer Shell
# Enable colors and change prompt:
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
# History in cache directory:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zsh/history
@eduuh
eduuh / smart-caps-lock.md
Last active May 3, 2022 16:56 — forked from tanyuan/smart-caps-lock.md
Smart Caps Lock: Remap Caps Lock to Control AND Escape

Smart Caps Lock: Remap to Control AND Escape (Linux, Mac, Windows)

  • Send Escape if you tap Caps Lock alone.
  • Send Control if you press Caps Lock with another key.
  • send caps lock if you press both shift keys together

For vim , emacs and normal day typing

{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}",
"launchmode" : "maximized",
"profiles":
{
"defaults": {
// Put settings here that you want to apply to all profiles
@eduuh
eduuh / android_on_arch.md
Created April 11, 2020 18:55 — forked from dianjuar/android_on_arch.md
install android SDK on arch linix

Install Android SDK on Arch Linux

1. Download Android SDK on your computer

yaourt android-sdk-platform-tools
yaourt android-udev
yaourt android-sdk

2. Create global variables on system

@eduuh
eduuh / gpg-wkd.md
Created May 14, 2020 09:12 — forked from kafene/gpg-wkd.md
Setting up WKD for self-hosted automatic key discovery

I just got this working so I figured I'd share what I found, since there's hardly any information about this anywhere online except an RFC, the GPG mailing list and one tutorial from the GnuPG blog.

You can use automatic key discovery with WKD (Web key directory) to make it easy for users to import your key, in GPG since version 2.1.12. Since this feature is fairly new, it isn't yet available in the current LTS release of Ubuntu (16.04; xenial), however it is available in Debian stable (stretch).

I couldn't add a DNS CERT or DANE / OPENPGPKEY record through my email service (which also hosts my nameservers). I tried making the PKA record - a foo._pka.example.com TXT record but GPG doesn't seem to recognize it and fails; I'm still investigating why.

So the last option for self-hosted auto-discovery was WKD.

First thing I had to do was add an email address to my key. My primary UID is just my name so the key represents my identity rather

@eduuh
eduuh / keybindings.json
Created May 20, 2020 04:36 — forked from sebastianhoitz/keybindings.json
VSCode Vim improvements
[
{
"key": "ctrl+h",
"command": "workbench.action.focusLeftGroup",
"when": "editorTextFocus && vim.active && vim.mode != 'Insert'"
},
{
"key": "ctrl+l",
"command": "workbench.action.focusRightGroup",
"when": "editorTextFocus && vim.active && vim.mode != 'Insert'"
# My remaps to colemak navigation
copymap <UP> e
copymap <DOWN> n
copymap <LEFT> h
copymap <RIGHT> i
copymap <HOME> gg
copymap <END> G
# pager navigation remaps
copypmap <UP> e <C-p>