Skip to content

Instantly share code, notes, and snippets.

View sanathusk's full-sized avatar

Sanath Kumar U sanathusk

View GitHub Profile
@YourAKShaw
YourAKShaw / namaste_javascript_notes.md
Last active April 7, 2024 15:20
Namaste 🙏 JavaScript is a YouTube playlist by Akshay Saini. These are the notes I've made when I was learning JavaScript from Scratch using the playlist.

How JavaScript Works?

Is JavaScript:

  • Synchronous or Asynchronous?
  • Single-threaded or Multi-threaded?
  • Everything in JavaScript happens inside an Execution Context
    • You can assume this execution context to be a big box or a container in which the whole JavaScript code is executed.
  • This big box has two components in it:
@idleberg
idleberg / vscode-macos-context-menu.md
Last active May 1, 2024 12:01
“Open in Visual Studio Code” in macOS context-menu

Open in Visual Studio Code

  • Open Automator
  • Create a new document
  • Select Quick Action
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
    • your default shell should already be selected, otherwise use /bin/zsh for macOS 10.15 (”Catalina”) or later
    • older versions of macOS use /bin/bash
  • if you're using something else, you probably know what to do 😉
@floooh
floooh / zig_test_debugging_vscode.md
Last active May 3, 2024 02:00
How to debug Zig tests in VSCode

Tested on macOS:

  1. Install the CodeLLDB VSCode extension. Unlike the debugger in the C/C++ extension, this allows to set breakpoints inside Zig "test" blocks (in the MS C/C++ extension debugger, breakpoints inside test blocks will be disabled once the debugger starts for unknown reasons.
  2. When compiling the test, tell it to also emit a binary: zig test -femit-bin=zig-out/bin/my-test src/bla.zig, otherwise there will be no executable to debug.
  3. The compiled test executable expects the path to the Zig executable as first command line argument, the launch.json file needs to be setup accordingly (note the args item):
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active May 2, 2024 11:53
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@ajmaln
ajmaln / downloadFile.dart
Last active February 20, 2024 17:12
Download file with progress in Dart/Flutter using 'http' package
import 'dart:typed_data';
import 'dart:io';
import 'package:http/http.dart';
import 'package:path_provider/path_provider.dart';
downloadFile(String url, {String filename}) async {
var httpClient = http.Client();
var request = new http.Request('GET', Uri.parse(url));
@vasanthk
vasanthk / System Design.md
Last active May 5, 2024 15:49
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?