Skip to content

Instantly share code, notes, and snippets.

View brunoais's full-sized avatar
🎯
Focusing

brunoais brunoais

🎯
Focusing
View GitHub Profile
@danish17
danish17 / gist:c5c5fb6eb99d452c339e393ed637640b
Last active April 13, 2024 09:22
LogiOps MX Master 3 Configuration
// Logiops (Linux driver) configuration for Logitech MX Master 3.
// Includes gestures, smartshift, DPI.
// Tested on logid v0.2.3 - GNOME 3.38.4 on Zorin OS 16 Pro
// What's working:
// 1. Window snapping using Gesture button (Thumb)
// 2. Forward Back Buttons
// 3. Top button (Ratchet-Free wheel)
// What's not working:
// 1. Thumb scroll (H-scroll)
// 2. Scroll button
@thingsiplay
thingsiplay / proton
Last active March 21, 2024 13:34
Proton script
#!/bin/sh
# Execute Windows programs with Proton from Steams installation folder, without
# starting Steam client.
#
# 1. Create a directory for Proton environment to run in. As an example make a
# folder "proton" in your home directory. This folder must exist in order
# to make Proton work.
#
# 2. Point the variable "env_dir" in this script to that folder or...
@Kabouik
Kabouik / gist:f4fb26a432abe9d38657b38a6dbceec0
Last active February 26, 2021 01:43
Pro1x layout: Qwerty suggestion from the community

F(x)tec is using the Pro1x as a way to introduce new keyboard layouts, but we noticed the latest proposal on IGG doesn't seem to address the biggest issue with the original Pro¹ shifted qwerty layout: missing slash/question-mark key, creating problems in all OS's and necessity for OS-specific workarounds. Therefore we hope F(x)tec uses this opportunity to not only un-shift but to also improve functionality, especially as alternate OS's like Linux are now clearly targeted.

bfuptg6hxomow8jjsjyv
Fig. 1. Unshifted qwerty layout shown in the Pro1x campaign.

The community quickly showed interest in this topic, with more than 150 posts by users from multiple OS's and about 3k views in just a few days. After one week of vivid discussions to weigh the costs and benefits of each suggestion users came up with, we think we've finally agreed on layout proposals we believe would significantly improve the user

@yougg
yougg / proxy.md
Last active April 7, 2024 04:02
complete ways to set http/socks/ssh proxy environment variables

set http or socks proxy environment variables

# set http proxy
export http_proxy=http://PROXYHOST:PROXYPORT

# set http proxy with user and password
export http_proxy=http://USERNAME:PASSWORD@PROXYHOST:PROXYPORT

# set http proxy with user and password (with special characters)
@obskyr
obskyr / stream_response.py
Last active April 2, 2024 09:53
How to stream a requests response as a file-like object.
# -*- coding: utf-8 -*-
import requests
from io import BytesIO, SEEK_SET, SEEK_END
class ResponseStream(object):
def __init__(self, request_iterator):
self._bytes = BytesIO()
self._iterator = request_iterator
@eirikbacker
eirikbacker / addEventListener-polyfill.js
Created June 3, 2012 19:30
addEventListener polyfill for IE6+
//addEventListener polyfill 1.0 / Eirik Backer / MIT Licence
(function(win, doc){
if(win.addEventListener)return; //No need to polyfill
function docHijack(p){var old = doc[p];doc[p] = function(v){return addListen(old(v))}}
function addEvent(on, fn, self){
return (self = this).attachEvent('on' + on, function(e){
var e = e || win.event;
e.preventDefault = e.preventDefault || function(){e.returnValue = false}
e.stopPropagation = e.stopPropagation || function(){e.cancelBubble = true}