Skip to content

Instantly share code, notes, and snippets.

View Migacz85's full-sized avatar

Marcin Mrugacz Migacz85

  • Dublin
View GitHub Profile
@TaipanRex
TaipanRex / Windows-app-Ranger.md
Last active May 13, 2024 06:38
How to launch Windows applications from Ranger in Windows Subsystem for Linux (WSL)

Make sure you have WSL with the Windows 10 Fall Creators Update installed. Ranger uses rifle as a file handler and you need its config file, rifle.conf. If you dont have it (should be in ~/.config/ranger/rifle.conf), run the command ranger --copy-config=rifle, then edit the resulting file.

To run Windows applications from Ranger, we will use cmd.exe /C start "" <file>, which works after the Fall Creators Update. The problem is that Ranger will feed in file paths using Unix pathing, but start expects Windows pathing. We will solve this by using sed to translate the path.

Add below code to your rifle.conf and you will be able to run Windows applications for the chosen file extensions.

@tuxflo
tuxflo / rotate_desktop.sh
Last active January 28, 2024 23:07 — forked from mildmojo/rotate_desktop.sh
Script to rotate the screen and touch devices on modern Linux desktops. Great for convertible laptops.
#!/bin/bash
#
# rotate_desktop.sh
#
# Rotates modern Linux desktop screen and input devices to match. Handy for
# convertible notebooks. Call this script from panel launchers, keyboard
# shortcuts, or touch gesture bindings (xSwipe, touchegg, etc.).
#
# Using transformation matrix bits taken from:
# https://wiki.ubuntu.com/X/InputCoordinateTransformation
@subfuzion
subfuzion / github-wiki-how-to.md
Last active April 20, 2024 09:22
GitHub Wiki How-To

How do I clone a GitHub wiki?

Any GitHub wiki can be cloned by appending wiki.git to the repo url, so the clone url for the repo https://myorg/myrepo/ is: git@github.com:myorg/myrepo.wiki.git (for ssh) or https://github.com/my/myrepo.wiki.git (for https).

You make edits, and commit and push your changes, like any normal repo. This wiki repo is distinct from any clone of the project repo (the repo without wiki.get appended).

How do I add images to a wiki page?

@PurpleBooth
PurpleBooth / README-Template.md
Last active May 21, 2024 21:42
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@jpzk
jpzk / qtileconf.py
Created November 9, 2013 10:04
qtile config for blog post
from libqtile.config import Key, Screen, Group
from libqtile.command import lazy
from libqtile import layout, bar, widget
import os
mod = "mod1"
modR = "mod5"
keys = [
# Switch between windows in current stack pane
@hofmannsven
hofmannsven / README.md
Last active May 3, 2024 15:30
Git CLI Cheatsheet
@matburt
matburt / i3plug.py
Created August 10, 2012 02:51
To be used with the i3 window manager (and i3-py). Takes a command 'save' or 'restore'. When 'save' is used it will store the monitor that each workspace is assigned to. When 'restore' is used it will restore those workspaces to the monitor that it was
import os
import i3
import sys
import pickle
def showHelp():
print(sys.argv[0] + " <save|restore>")
def get_visible_workspace():
for workspace in i3.get_workspaces():
@tomjnixon
tomjnixon / config
Created November 27, 2011 17:17
My i3 config file
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!