Skip to content

Instantly share code, notes, and snippets.

View mbrav's full-sized avatar

Michael mbrav

  • Borrow Checker LLC
  • 192.168.1.0/24
  • LinkedIn in/mbrav
View GitHub Profile
@kborling
kborling / configuration.nix
Created December 24, 2021 23:59
NixOS Configuration (Sway/Wayland Enabled)
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
nix = {
package = pkgs.nixUnstable;
extraOptions = ''
@niftycode
niftycode / vscode_settings.json
Created August 5, 2021 07:33
VS Code settings for flake8 and autopep8
{
// Whether to lint Python files
"python.linting.enabled": true,
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
// Path to flake8 executable
"python.linting.flake8Path": "/Library/Frameworks/Python.framework/Versions/3.9/bin/flake8",
// Flake8 Arguments

Technologies to learn to become a Back End Developer (Python/Django)

  • Linux - be proficient using Ubuntu for example and the CLI and understand how the shell works, what are environment variables, subshells, processes/tasks, etc...
  • Docker (and docker-compose) - what are containers and how they work (conceptually) and how to create and run ones
  • Git - what does version control system mean and how to use Git
  • RDB (relational databases) - what are relational databases, and understand tables, how to create them and make relations between them as needed... also understand that through SQLite and PostgreSQL (preferred) or MySQL
  • Python - how to write Python very well and understand its [OOP] implementation...
  • Virtualenv - And how to create virtual environments for python to isolate it from the system's installed version...
  • Virtualenvwrapper to manage virtual environments easily
@dshoreman
dshoreman / slurp.md
Last active July 1, 2024 12:19
Swaymsg commands for listing windows and outputs

i3

Get Active Window ID

xdotool getactivewindow

Get Current Desktop ID

xdotool get_desktop_for_window "$(xdotool getactivewindow)"
@brunoqs
brunoqs / gist:219f5e9852b718d831bce502bdd2e511
Last active November 17, 2020 13:14
Easy deploy Django Nginx + gunicorn and Vuejs or Reactjs
---------------- Django Nginx + gunicorn ----------------
Primeiro rode o gunicorn no repositorio do projeto:
$ gunicorn --bind 0.0.0.0:8000 my_academic.wsgi &
Depois crie a seguinte configuração no Nginx (/etc/nginx/sites-available):
server {
access_log /home/user/code_back/logs/access.log;
error_log /home/user/code_back/logs/error.log;
@drmalex07
drmalex07 / README-setup-tunnel-as-systemd-service.md
Last active June 21, 2024 17:44
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@atcuno
atcuno / gist:3425484ac5cce5298932
Last active March 25, 2024 13:55
HowTo: Privacy & Security Conscious Browsing

The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.

I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.

Table of Contents

@magicznyleszek
magicznyleszek / jekyll-and-liquid.md
Last active January 12, 2024 03:46
Jekyll & Liquid Cheatsheet

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.

Running

Running a local server for testing purposes:

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 4, 2024 17:58
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@saetia
saetia / gist:1623487
Last active May 1, 2024 19:55
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat