Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View 101v's full-sized avatar

Vimal 101v

View GitHub Profile
@101v
101v / shell.nix
Created October 31, 2022 11:13
shell.nix for elixir
{pkgs ? import <nixpkgs> {}}:
pkgs.mkShell {
buildInputs = with pkgs; [
elixir
nodejs
pgcli
];
}
@101v
101v / shell.nix
Last active October 31, 2022 11:14
shell.nix file for rust
{pkgs ? import <nixpkgs> {}}: let
cargo-run-bin = pkgs.rustPlatform.buildRustPackage rec {
pname = "cargo-run-bin";
version = "0.3.1";
src = pkgs.fetchCrate {
inherit pname version;
sha256 = "sha256-4zu3vXlGKmBlB5we3qR0V6LIALqPxVGosBF4EkO7aHE=";
};
cargoSha256 = "sha256-B5SCZDdfvrE3HeVVX79W6gvxxIiiVX3PrIWG2jR5VgA=";
};
@101v
101v / git_extraConfig
Created August 12, 2022 09:13
Setup git defaultBranch as extraConfig in nix
programs.git = {
enable = true;
userName = "Vimal Patel";
userEmail = "mailtovimal@gmail.com";
extraConfig = {
init = { defaultBranch = "main"; };
};
};
@101v
101v / NatualScrollingInWindows.ps1
Created January 18, 2017 21:19
Powershell script to enable natural scrolling in Windows
# View registry settings
Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 0
# Change registry settings
# Reverse mouse wheel scroll FlipFlopWheel = 1
# Normal mouse wheel scroll FlipFlopWheel = 0
Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 0 | ForEach-Object { Set-ItemProperty $_.PSPath FlipFlopWheel 1 }
# Restore default scroll direction
# Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 1 | ForEach-Object { Set-ItemProperty $_.PSPath FlipFlopWheel 0 }
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Net;
namespace EventStoreService
{
public class EventStoreService
{
function inPlacePrinter() {
console.log("\u001B[2J\u001B[0;0f");
console.log(arguments[0]["toString"]());
}