Skip to content

Instantly share code, notes, and snippets.

View fcoury's full-sized avatar

Felipe Coury fcoury

View GitHub Profile
@fcoury
fcoury / etc-nixos
Created January 12, 2024 16:22 — forked from p-alik/etc-nixos
NixOS config on Dell XPS 13 Plus 9320
# /etc/nixos/configuration.nix
{ config, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
];
boot.loader.systemd-boot.enable = true;
@fcoury
fcoury / xps_9320.nix
Created January 12, 2024 04:19 — forked from notgne2/xps_9320.nix
It Just Works ™️
{
config,
pkgs,
lib,
inputs,
...
}: let
ipu6-camera-bin = with pkgs;
stdenv.mkDerivation rec {
pname = "ipu6-camera-bin";
@fcoury
fcoury / from-init.lua-to-default.nix.md
Created January 7, 2024 02:11 — forked from nat-418/from-init.lua-to-default.nix.md
Advanced Neovim configuration with Nix and Home Manager

From init.lua to default.nix

In a previous post I explained how to manage Neovim plugins with Nix and Home Manager. In this post I want to go further and show how to migrate Neovim configuration from ~/.config/nvim to ~/.config/home-manager entirely. The end result will be to split our Neovim setup into multiple modules that colocate plugin sourcing and configuration.

If you haven't read the post linked above, do so now. We will assume the

@fcoury
fcoury / nix-home-manager-neovim-setup.md
Created January 7, 2024 01:35 — forked from nat-418/nix-home-manager-neovim-setup.md
Manage Neovim plugins (and more!) with Nix and Home Manager

Manage Neovim plugins (and more!) with Nix and Home Manager

Highly extensible software like Emacs, Vim, and Neovim tend to grow their own package managers. A software developer, for example, might want to install editor plugins that hook into a particular programming language's linter or language server. The programmer's text editor is therefore extended to support managing additional software to extend the text editor. If this loop continues for too long, the programmer's editor becomes more delicate and complex. The remedy for this problem is to manage software using dedicated tools apart

@fcoury
fcoury / Cargo.toml
Created August 10, 2023 18:45 — forked from vchernetskyi993/Cargo.toml
Rust - Single testcontainer for multiple test functions
[package]
name = "testcontainers-sample"
version = "0.1.0"
edition = "2021"
[dev-dependencies]
async_once = "0.2.6"
aws-sdk-s3 = "0.28.0"
ctor = "0.2.4"
lazy_static = "1.4.0"
@fcoury
fcoury / rust-cross-compile-openssl.md
Last active February 6, 2023 14:42 — forked from marirs/rust-cross-compile-openssl
Rust OpenSSL Cross Compile for Linux on Mac M1

Install the toolchain

brew tap SergioBenitez/osxct
brew install x86_64-unknown-linux-gnu

this should get installed in:

/opt/homebrew/Cellar/x86_64-unknown-linux-gnu/

Installing the macOS OpenSSL - if not already installed

@fcoury
fcoury / README.md
Created October 19, 2021 02:13 — forked from gjreasoner/README.md
Expand Ubuntu 20 Proxmox Disk
# Resize the file system in UI, under VM -> Hardware -> Click on the disk to resize, click "Resize disk" button

# Confirm increase in disk space (1TB in my case)
$ lsblk
NAME                      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                         8:0    0    1T  0 disk
├─sda1                      8:1    0    1M  0 part
├─sda2                      8:2    0    1G  0 part /boot
└─sda3                      8:3    0    1T  0 part
@fcoury
fcoury / README.md
Created August 15, 2020 22:54 — forked from snowkidind/README.md
TDAmeritrade API Notes for Node.js

Access to Ameritrade API

notes that may be helpful for node.js devs

What I've gathered is authorization tokens must be earned first. Authorization tokens are good for three months, once you are setup, you will get two tokens which come as long strings, An access_token and a refresh_token. Access tokens are only valid for 30 minutes so you will need to code to refresh the session using the refresh token frequently. When you refresh, you are given a new access token and that is what you use to "login" or pull from the api for the next period. But in order to get the tokens, you will be required to go through some processes to get a valid token that applies to your app. The following text kind of steers you in that direction...

Making an app

On the api site you will need to make an app, where you pick some random name by using some random numbers. It should be automatically generated but it isnt. For this field item, I simply went to https://www.uuidgenerator.net/ and just grabbed the firs

@fcoury
fcoury / AdobeFixAMD
Created May 29, 2020 14:11 — forked from XLNCs/AdobeFixAMD
To fix adobe products crashes on AMD hackintosh
___ADOBE CRASH FIX BY XLNC___
USAGE : Open terminal and run the below commands as required.
NOTE: File path changes in each version release. So if the file is not found you can find the specified file manually and replace the path in the below commands.
You can also use this command to find the location of a specific adobe file :
eg:- if you want to search for MMXCore then run this command :
find /Applications/Adobe* -type f -name "MMXCore" | sed 's/ /\\ /g'
Photoshop crash fix :-
@fcoury
fcoury / AuthenticationModule.cs
Created March 29, 2017 12:40 — forked from jchannon/AuthenticationModule.cs
How to use ASP.Net Core Cookie Middleware and sign the user in within a Nancy module
public class AuthModule : NancyModule
{
public AuthModule()
{
Post("/login", async _ =>
{
var myclaims = new List<Claim>(new Claim[] { new Claim("Id", "SOME USER ID FROM SOMEWHERE!!") });
var claimsPrincipal = new ClaimsPrincipal(new ClaimsIdentity(myclaims, "MyCookieMW"));