Skip to content

Instantly share code, notes, and snippets.

View dukex's full-sized avatar
✔️
Verified Account

Duke dukex

✔️
Verified Account
View GitHub Profile
import 'package:flutter/material.dart';
final books = [
const Book(id: '3160', name: 'The Odyssey', author: 'Homer'),
const Book(id: '8795', name: 'The Divine Comedy', author: 'Dante Alighieri'),
];
void main() {
final betterRoutes = BetterRouter(routes: {
'/': (_) => const HomeScreen(),
@dukex
dukex / ArchLinuxWSL2.md
Created March 2, 2022 16:30 — forked from ld100/ArchLinuxWSL2.md
Steps for setting up Arch Linux on WSL2

Migrating from Ubuntu on WSL to ArchLinux on WSL2

Obsolete notice

This document was created back in 2020 and might not be actual nowadays. It is not supported anymore, so use thise information at your own risk.

Upgrading to WSL 2

  • Download WSL2 Kernel
  • run wsl --set-default-version 2 in windows command line, so that all future WSL machine will use WSL2.
Function gplr() {
git pull --rebase
}
Function gpsh() {
$branch = git rev-parse --abbrev-ref HEAD
git push -u origin $branch
}
function prompt() {

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@dukex
dukex / cerbot.sh
Last active January 5, 2019 13:42
Docker cerbot
docker run -it --rm \
-v /etc/letsencrypt:/etc/letsencrypt \
-v /var/lib/letsencrypt:/var/lib/letsencrypt \
-v /var/www/letsencrypt:/var/www/letsencrypt \
-v "/var/log/letsencrypt:/var/log/letsencrypt" \
certbot/certbot \
certonly --webroot \
--register-unsafely-without-email --agree-tos \
--webroot-path=/var/www/letsencrypt \
-d DOMAIN
@dukex
dukex / install.sh
Created June 20, 2011 04:29
ambiente
open "http://code.google.com/p/iterm2/downloads/list"
open "https://github.com/kennethreitz/osx-gcc-installer"
sudo /Developer/Library/uninstall-devtools –mode=all
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
brew update
brew install git
brew install mysql
# Adapted from a C# example here:
# http://stackoverflow.com/questions/43224/how-do-i-calculate-a-trendline-for-a-graph
# And thanks to John Esser for helping figure out how to
# calculate the targets to stabilize a negative slope!
class LinearRegression
attr_accessor :slope, :intercept
# Pass in an array of values to get the regression on
@dukex
dukex / -etc-NetworkManager-NetworkManager.conf
Created March 11, 2018 16:34
.dev domain resolving to 127.0.0.1 [Arch]
# Configuration file for NetworkManager.
# See "man 5 NetworkManager.conf" for details.
[main]
dns=dnsmasq
# frozen_string_literal: true
module MyApp
module TaggedWorkerTracer
extend ActiveSupport::Concern
attr_reader :metadata, :delivery_info,
:routing_key, :correlation_id, :customer_id,
:timestamp