Skip to content

Instantly share code, notes, and snippets.

View ChaitanyaPramod's full-sized avatar

Chaitanya Pramod ChaitanyaPramod

View GitHub Profile
@jackblk
jackblk / LogitechF310_Macbook.MD
Created April 13, 2021 16:07
Getting Logitech F310 to work with Macbook USB-C port

Connect & use Logitech F310 with Macbook

Since my Macbook Pro only has USB-C port, I used an USB-A to USB-C adapter to connect my F310 to it, but it does not work (pressing MODE button does not turn on the LED).

How to

To make it work:

  • Disconnect F310 from Mac
  • On F310: switch X-input to D-input
  • Hold Logitech button (in the middle)
  • Connect F310 to Mac via adapter, now you can release the Logitech button.
@farmerbb
farmerbb / scrcpy-desktop-mode.sh
Last active March 14, 2023 22:58
Pseudo-desktop mode using scrcpy
#!/bin/bash
show-help() {
BASENAME=$(basename "$0")
echo "Usage: $BASENAME [device-name] [optional-resolution] [optional-density]"
exit 1
}
[[ $1 = "-h" || $1 = "--help" ]] && show-help
@ganadist
ganadist / init.qcom.usb.rc
Created November 9, 2017 01:06
usb configuration from Xiaomi A1 (tissot)
# Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
@evantobin
evantobin / docker-compose.yaml
Created June 13, 2017 22:12
docker compose for openstf
rethinkdb:
image: rethinkdb:2.3
ports:
- "8080:8080"
- "28015:28015"
- "29015:29015"
restart: always
volumes:
- "/srv/rethinkdb:/data"
command: "rethinkdb --bind all --cache-size 2048"
@braian87b
braian87b / dumb-ap-wired-link.sh
Last active March 30, 2024 20:21
How to setup a Dumb AP, Wired backbone for OpenWRT / LEDE
@neworld
neworld / howto.md
Last active September 15, 2020 11:32
How to make faster Android build without sacrificing new api lint check

Original solution sacrifices new api lint check.

Here my solution:

int minSdk = hasProperty('minSdk') ? minSdk.toInteger() : 16

apply plugin: 'com.android.application'

android {
 compileSdkVersion 23
def toCamelCase(String string) {
String result = ""
string.findAll("[^\\W]+") { String word ->
result += word.capitalize()
}
return result
}
afterEvaluate { project ->
Configuration runtimeConfiguration = project.configurations.getByName('compile')
@dmarcato
dmarcato / strip_play_services.gradle
Last active December 21, 2022 10:10
Gradle task to strip unused packages on Google Play Services library
def toCamelCase(String string) {
String result = ""
string.findAll("[^\\W]+") { String word ->
result += word.capitalize()
}
return result
}
afterEvaluate { project ->
Configuration runtimeConfiguration = project.configurations.getByName('compile')
; ___ _ __ ___ __ ___
; / __|_ _ __ _| |_____ / /| __|/ \_ )
; \__ \ ' \/ _` | / / -_) _ \__ \ () / /
; |___/_||_\__,_|_\_\___\___/___/\__/___|
; An annotated version of the snake example from Nick Morgan's 6502 assembly tutorial
; on http://skilldrick.github.io/easy6502/ that I created as an exercise for myself
; to learn a little bit about assembly. I **think** I understood everything, but I may
; also be completely wrong :-)