Skip to content

Instantly share code, notes, and snippets.

View mtrsk's full-sized avatar
🛠️
Tinkering

Marcos Benevides mtrsk

🛠️
Tinkering
View GitHub Profile
# Sessions
ctrl + $ => Rename session
# Windows
ctrl + , => Rename
ctrl + & => Kill window
# Panes
ctrl + ! => Pane to Window
ctrl + z => Zoom pane
@aabs
aabs / shell.nix
Created February 6, 2019 21:33
nix shell for python dev
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
let
inherit (lib) optional optionals;
proxy = "<your proxy if you need one>";
in
mkShell {
@Denommus
Denommus / azureoverlay.nix
Created March 7, 2019 20:15
This file should be in `~/.config/nixpkgs/overlays`. This will fix nixopsUnstable
self: super: rec {
nixopsUnstable = super.nixopsUnstable.overrideAttrs (oldAttrs: {
preConfigure = ''
find . -iname azure_common.py -exec sed -i 's/NetworkResourceProviderClient/NetworkManagementClient/' {} \;
find . -iname azure_vm.py -exec sed -i 's/from azure.mgmt.network import PublicIpAddress, NetworkInterface, NetworkInterfaceIpConfiguration, IpAllocationMethod, PublicIpAddressDnsSettings, ResourceId/from azure.mgmt.network.models import PublicIPAddress, NetworkInterface, NetworkInterfaceIPConfiguration, IPAllocationMethod, PublicIPAddressDnsSettings\nfrom azure.mgmt.batchai.models import ResourceId/' {} \;
find . -iname azure_availability_set.py -exec sed -i 's/from azure.mgmt.compute import AvailabilitySet/from azure.mgmt.compute.models import AvailabilitySet/' {} \;
find . -iname azure_resource_group.py -exec sed -i 's/from azure.mgmt.resource import ResourceGroup/from azure.mgmt.resource.resources.models import ResourceGroup/' {} \;
find . -iname azure_storage.py
@Ronald-TR
Ronald-TR / pipe_in_python.py
Last active November 20, 2019 12:06
Simple implementation of pipe operator into your functions: https://code.sololearn.com/ca4QB7ZEM91L/#py
"""Cause the fstrings notation into the example 'congrats' functions,
the examples only works in python 3.8.
"""
from functools import partial
class Pipe:
def __init__(self, function):
self.function = function
{
"python.pythonPath": "/home/jherfson/anaconda3",
"workbench.colorTheme": "Monokai Operator Code",
"window.zoomLevel": 1,
"workbench.iconTheme": "vscode-great-icons"
}
{ pkgs ? import <nixpkgs> {}}:
let
jupyterPort = pkgs.config.jupyterPort;
fhs = pkgs.buildFHSUserEnv {
name = "julia-fhs";
targetPkgs = pkgs: with pkgs;
[
git
gitRepo
@jonashaag
jonashaag / realapp.py
Created December 7, 2010 14:03
WSGI middleware that automatically reloads the wrapped app if it changes
def app(env, start_response):
start_response('200 ok', [])
return 'hello\n'
@AndersonTorres
AndersonTorres / nix-development-template-file.org
Last active September 27, 2021 21:01
A project workflow for Nixpkgs/NixOS

Standard project structure

This is a project structure I’ve found useful. Looking for any thoughts/comments/feedback. Roughly, I found a tension between the style nixpkgs expects and the style conducive to development, so I extracted the common portion into a derivation.nix which is used by the remaining .nix files. This setup allows me to use nix build, nix-shell, overlays, Hydra, alternate packaging schemes, cross-compiling, etc.

@atmosmps
atmosmps / RemoteWorkGuide.md
Last active March 23, 2022 14:49
Remote Work Guide

Remote Work Guide

Este é um pequeno guia para quem quer começar a desbravar no mundo do trabalho remoto.

Outras iniciativas de trabalhos/jobs remotos

Outros repositórios que também ajudam pessoas a desbravar no mundo do trabalho remoto.

https://github.com/DyegoCosta/trabalhando-remoto

@aabs
aabs / shell.nix
Last active July 10, 2022 05:24
A simple nix-shell script to establish an environment for Phoenix, Elixir and PostgreSQL development
{ nixpkgs ? import <nixpkgs> {}
, version ? "0.1"
, proxy ? "http://10.183.23.58:3128"
}:
with nixpkgs;
let
elixir = beam.packages.erlangR21.elixir_1_7;
nodejs = nodejs-10_x;