Skip to content

Instantly share code, notes, and snippets.

@mrk-han
mrk-han / change-accessibility-settings-with-adb.md
Last active May 19, 2024 21:38
Enable and Disable Android Accessibility Settings from the Command Line using ADB (Font scale, talkback, color blind)

Using ADB to control Accessbility settings for easier testing with Android Emulators + Real Devices

It's a lot easier to test accessibility on the fly using ADB. This gist attempts to make the days of navigating through the Android device settings UI to change Accessibility settings obsolete.

These ADB commands will hopefully encourage Android developers to test and use their apps with common Accessiblility settings enabled.

Credit to James Nitsch for inspiring this, and for figuring out the put commands to enable these settings.

Font Scale (Font Size -- Testing Dynamic Text)

@josephrocca
josephrocca / BigMap.js
Last active May 19, 2024 21:35
BigMap - wrapper to get past the ~16 million key limit on JavaScript Maps
// only covers a small subset of the Map api!
// haven't debugged yet!
class BigMap {
constructor(iterable) {
if(iterable) throw new Error("haven't implemented construction with iterable yet");
this._maps = [new Map()];
this._perMapSizeLimit = 14000000;
this.size = 0;
}
@EarthlingDavey
EarthlingDavey / class-comments.php
Created January 30, 2020 15:27 — forked from mattclements/function.php
Wordpress Disable Comments (add to function.php)
<?php
/**
* Class Comments.
* Code refactored from:
* https://gist.github.com/mattclements/eab5ef656b2f946c4bfb
*
* @package Foo
*/
namespace Boop;
@squarism
squarism / iterm2.md
Last active May 19, 2024 21:32
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@walkerjeffd
walkerjeffd / Synology-Diskstation-Git.md
Last active May 19, 2024 21:30
Instructions for setting up git server on Synology Diskstation

Configure Synology NAS as Git Server

Instructions for setting up a git server on a Synology NAS with Diskstation. Specifically, I am using a DS414 with DSM 5.0.

Set Up User and Folder

  • Create user gituser via Diskstation interface (with File Station and WebDAV privilages)
  • Add new shared folder called git (located at /volume1/git) with read/write access for gituser and admin. This folder will hold all the repos.
  • Install Git Server package via Diskstation
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 19, 2024 21:27
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@calaway
calaway / git_workflow_best_practices.md
Last active May 19, 2024 21:25
Git Workflow Best Practices

Git Branch Merging Best Practices

  1. After you've selected a feature to work on, create a branch in your local repo to build it in.
    • $ git checkout -b calaway/short_description_of_feature
  2. Implement the requested feature, make sure all tests are passing, and commit all changes in the new branch.
  3. Checkout the master branch locally.
    • $ git checkout master
  4. Pull down the master branch from GitHub to get the most up to date changes from others. If you practice git workflow as described here you should never have a merge conflict at this step.
    • $ git pull origin master
  5. Make sure all tests are passing on master and then checkout your new branch.
  • $ git checkout calaway/short_description_of_feature
@disler
disler / README.md
Last active May 19, 2024 21:25
Personal AI Assistant: 'Ada' - v0

This is not working complete code.

This is strictly a v0, scrapy, proof of concept for the first version of a personal AI Assistant working end to end in just ~322 LOC.

It's only a frame of reference for you to consume the core ideas of how to build a POC of a personal AI Assistant.

To see the high level of how this works check out the explanation video. To follow our agentic journey check out the @IndyDevDan channel.

Stay focused, keep building.

#! /usr/bin/env nix-shell
#! nix-shell -i bash -p curl yt-dlp exiftool
set -eou pipefail
if [[ $# -lt 3 ]] || [[ $# -gt 4 ]]; then
usage 'doesnt-have-spotify-gf GFNAME ARTIST TITLE [URL]'
exit
fi
gfname="$1"
@hibobmaster
hibobmaster / README.md
Last active May 19, 2024 21:23
Matrix (dendrite + element-web) in Docker with Traefik and federation

project structure

.
├── compose.yaml
├── config
│   └── dendrite.yaml
├── element-web
│   └── config.json
├── nginx
│   └── dendrite.conf