Skip to content

Instantly share code, notes, and snippets.

@TjWallas
TjWallas / enable USB debug.adb
Created September 26, 2021 20:00 — forked from pantasio/enable USB debug.adb
adb cmd enable USB debug cant touch screeen
I got it to work :)
NOTE: This requires unlocked bootloader.
Connect the device to Mac or PC in recovery mode. (I had to map the process in my mind as the screen was broken).
Now open terminal/CMD in computer and go to platform-tools/. type and enter ./adb devices to check if the device is connected in recovery mode.
Now type ./adb shell mount data and ./adb shell mount system to mount the respective directories.
Get the persist.sys.usb.config file in your system using ./adb pull /data/property/persist.sys.usb.config /Your directory
Now open that file in a texteditor and edit it to mtp,adb and save.
Now push the file back in the device; ./adb push /your-directory/persist.sys.usb.config /data/property

General ideas

  • A hangout lobby with a twitch-style music/video-request robot. People can type certain commands in chat to play a YouTube video or a spotify track.
  • Online movie-watching / Netflix together. How about a movie-watching marathon or a 90s music videos marathon?
  • Collaborative music-playing
  • A person who can DJ could do live-party-mix to other listeners. An online party!
  • Joining a specific twitch stream together and having fun in chat
  • Let's play: People can play an online video game together.
  • Online drinking games while watching a politician do a press-conference live stream. Example: Take a shot every time someone says "Corona".
  • [Evil] Online lecture raids. People can choose a random lecture and crash its live stream LOL
@TjWallas
TjWallas / remote-work-tips.md
Last active June 2, 2020 15:49
Some tips on working remotely from home #covid19

Preamble

Working from home is a very tricky task that a lot of people think they can get accustomed to. In reality, some workers can cope with this very well, whereas others get the illusion that they are productive when they are actually not.

Our wonderful brain plays a lot of tricks on us, and being mindful of your personality type, as well as those tricks, can make the difference between an efficient and a deficient remote working experience.

This post will underscore a few tips to remain productive while working from home.

Routine

'Users hate change'

This week NN Group released a video by Jakob Nielson in which he attempts to help designers deal with the problem of customers being resistant to their new site/product redesign. The argument goes thusly:

  1. Humans naturally resist change
  2. Your change is for the better
  3. Customers should just get used to it and stop complaining

There's slightly more to it than that, he caveats his argument with requiring you to have of course followed their best practices on product design, and allows for a period of customers being able to elect to continue to use the old site, although he says this is obviously only a temporary solution as you don't want to support both.

@TjWallas
TjWallas / gh-backup-starred.sh
Created January 6, 2019 12:21 — forked from anonymous/gh-backup-starred.sh
Backup starred GitHub repositories
#!/bin/bash
user="CHANGEME"
pages=$(curl -I https://api.github.com/users/$user/starred | sed -nr 's/^Link:.*page=([0-9]+).*/\1/p')
for page in $(seq 0 $pages); do
curl "https://api.github.com/users/$user/starred?page=$page&per_page=100" | jq -r '.[].html_url' |
while read rp; do
git clone $rp
done
@TjWallas
TjWallas / iptables-cheatsheet.md
Created August 16, 2018 10:56 — forked from mcastelino/iptables-cheatsheet.md
iptables-cheatsheet

The netfilter hooks in the kernel and where they hook in the packet flow

The figure below calls out

  • The netfilter hooks
  • The order of table traversal
@TjWallas
TjWallas / ovs-cheat.md
Created July 13, 2018 13:38 — forked from djoreilly/ovs-cheat.md
OVS cheat sheet

DB

ovs-vsctl list open_vswitch
ovs-vsctl list interface
ovs-vsctl --columns=ofport,name list Interface
ovs-vsctl --columns=ofport,name --format=table list Interface
ovs-vsctl --format=table --columns=name,mac_in_use find Interface name=br-dpdk1
ovs-vsctl get interface vhub656c3cb-23 name

ovs-vsctl set port vlan1729 tag=1729
- What do Etcd, Consul, and Zookeeper do?
- Service Registration:
- Host, port number, and sometimes authentication credentials, protocols, versions
numbers, and/or environment details.
- Service Discovery:
- Ability for client application to query the central registry to learn of service location.
- Consistent and durable general-purpose K/V store across distributed system.
- Some solutions support this better than others.
- Based on Paxos or some derivative (i.e. Raft) algorithm to quickly converge to a consistent state.
- Centralized locking can be based on this K/V store.