Skip to content

Instantly share code, notes, and snippets.

@danteay
danteay / nix-installation.md
Created April 23, 2024 23:10
Nix installation (flakes + home-manager)

Install

Nix es entre varias cosas un gestor de paquetes que mantiene separacion entre las dependencias de cada proyecto sin interferir con el sistema de la PC directamente mediante la gestion de diferentes sources configurados mediante links simbolicos al sistema principal.

Podemos compararlo con Homebrew el cual es el gestor de paquetes mas comunmente usado en MacOS, la mayor diferencia es que mientras que brew instala las dependencias dentro de una carpeta propia del disco del sistema principal, nix maneja todas las dependencias requeridas dentro de un volumen de disco logico completamente aparte del sistema de archivos principal de la PC.

@ScriptAutomate
ScriptAutomate / Install-ChocoStarterPackages.ps1
Last active May 22, 2024 02:38
Install Chocolatey on Windows 10 or 11 via PowerShell w/ Some Starter Packages
<#
Simple, nice bootstrap to get Windows 10 up-and-running with nice setup!
- Installs chocolatey (choco)
- Installs common software
I highly recommend Windows Subsystem for Linux (WSL), also, which is covered in
a separate gist. It also has a choco command for installing Docker Desktop after:
- https://gist.github.com/ScriptAutomate/f94cd44dacd0f420fae65414e717212d
#>
@ogazitt
ogazitt / auth.go
Created April 14, 2020 05:53
Auth0 PKCE flow for a CLI built in golang
package auth
import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
"net/url"
@jtumano
jtumano / init.vim
Last active October 29, 2022 03:25
Neovim coc config for frontend development
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
" Make sure you use single quotes
" ---
Plug 'scrooloose/nerdtree' " NERD Tree
Plug 'Xuyuanp/nerdtree-git-plugin' " show git status in Nerd tree
@tomcant
tomcant / configure-s3-lambda-notification.sh
Last active July 22, 2023 20:57
Configure S3 Lambda notifications
#!/usr/bin/env bash
##
# This configures an S3 bucket ObjectCreated notification for the given Lambda
# function so that when a file is uploaded the Lambda function is invoked. This
# is useful when the bucket is not defined in the same CloudFormation template
# as the function. CloudFormation cannot setup the notification in this case.
#
# Note that the AWS CLI is used and will require valid AWS credentials for the
# account containing the resources. The 'jq' JSON processor is also required
@mdziekon
mdziekon / xps_15_9570__dualboot_with_encryption__notes.md
Last active July 11, 2024 09:34
XPS 15 9570 - DualBoot with Encryption (Windows 10 with BitLocker + Ubuntu 18.04 with LVM on LUKS)
  • Based on https://askubuntu.com/a/293029/286776
  • Installation date: 15-09-2018
  • Additional notes based on my own experience
  • The process describes a completely fresh installation with a complete repartitioning, however it should work fine when Windows is already installed (eg. brand new machine with Windows preinstalled).
  • The process was conducted on Dell's XPS 15 9570 (2018) with specs:
    • CPU: i7-8750H
    • Screen: 4K with Touch
    • RAM: 16 GB (original) / 32 GB (manually upgraded)
  • Drive: 512 GB (SK Hynix PC401)
@Ocramius
Ocramius / Caddyfile
Last active March 11, 2024 22:14
Example docker + docker-compose + caddy + traefik setup that routes to multiple apps from one exposed HTTP port
:80 {
root /serve
}
package pprof
import (
"fmt"
"net"
"net/http"
"net/http/pprof"
"runtime"
rpprof "runtime/pprof"
"runtime/trace"
@ThiagoBarradas
ThiagoBarradas / config.yml
Created March 16, 2018 19:07
Auto rollback with circleci 2.0
## 1) GENERATE AN API TOKEN (https://circleci.com/gh/<gh-user>/<gh-repo-name>/edit#api)
## 2) ADD ENV VAR WITH NAME "CIRCLE_API_TOKEN" WITH PREVIOUS GENERATED TOKEN
version: 2
jobs:
build:
machine: true
steps:
- run:
name: Build App