Skip to content

Instantly share code, notes, and snippets.

View phanirithvij's full-sized avatar
💫
you spin my head right round ..

Phani Rithvij phanirithvij

💫
you spin my head right round ..
  • 08:33 (UTC +05:30)
View GitHub Profile
@roysubs
roysubs / Custom-Tools.psm1
Last active April 7, 2024 20:20
Custom-Tools Module to copy into C:\Program Files\WindowsPowerShell\Modules\Custom-Tools
####################
#
# Custom-Tools.psm1
# Current Version: 2020-10-24
#
# Module is installed to the Module folder visible to all users (but can only be modified by Administrators):
# C:\Program Files\WindowsPowerShell\Modules\Custome-Tools
#
# The Module contains only functions to access on demand as required.
# mods : View all Modules installed in all PSModulePath folders.
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active April 18, 2025 18:48
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 !

@cppio
cppio / vectormagic.js
Last active January 24, 2025 18:23
Extract previews from vectormagic.com as SVG files
VecResult.prototype.toSVG = function() {
let paths = [];
this.pieces.forEach(piece => {
let index = 0;
piece.shapes.forEach(shape => {
let commands = [];
shape.lenghts.forEach(length => {
@codediodeio
codediodeio / config.js
Last active April 7, 2025 00:44
Snippets from the Firestore Data Modeling Course
import * as firebase from 'firebase/app';
import 'firebase/firestore';
var firebaseConfig = {
// your firebase credentials
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
@flatlinebb
flatlinebb / mpv keyboard shortcuts
Last active March 9, 2025 19:35
mpv keyboard shortcuts
Keyboard Control
LEFT and RIGHT
Seek backward/forward 5 seconds. Shift+arrow does a 1 second exact seek (see --hr-seek).
UP and DOWN
Seek forward/backward 1 minute. Shift+arrow does a 5 second exact seek (see --hr-seek).
Ctrl+LEFT and Ctrl+RIGHT
Seek to the previous/next subtitle. Subject to some restrictions and might not always work; see sub-seek command.
Ctrl+Shift+Left and Ctrl+Shift+Right
Adjust subtitle delay so that the next or previous subtitle is displayed now. This is especially useful to sync subtitles to audio.
[ and ]
@lheckemann
lheckemann / 0-readme.md
Last active February 28, 2025 16:31
Expression for a buildEnv-based declarative user environment.

Expression for a buildEnv-based declarative user environment

This is one way of managing your user profile declaratively.

Alternatives include:

  • an attrset-based nix-env-based environment, installed using nix-env -ir rather than nix-env --set. LnL has an overlay which shows a way of doing this.
  • home-manager, which provides NixOS-like config for your $HOME

Note that this is incompatible with regular imperative use of nix-env, e.g. nix-env -iA nixpkgs.hello. It has the advantage of allowing the installation of multiple outputs of the same package much better than nix-env's builtin profile builder does.

@Hollerberg
Hollerberg / Dockerfile
Created November 21, 2018 11:47
golang musl libc shared object constructor reproducer
FROM golang:1.11.2-alpine
USER root
RUN apk update && apk add musl-dbg gcc libc-dev
COPY preload.c /go
COPY gogo.go /go
COPY runtest.sh /go
RUN gcc -ggdb -fPIC -shared -o libpreload.so preload.c && go build -o gogo-int-linker gogo.go && go build -ldflags '-linkmode external' -o gogo-ext-linker gogo.go
ENTRYPOINT [ "/bin/sh" ]
@leptos-null
leptos-null / Mojave-dynamic-wallpapers.md
Last active April 29, 2021 12:26
Mojave Dynamic Desktop- How it works

Mojave Dynamic Desktop- How it works

Prompted by a tweet by NSHipster, and a subsequent thread, I wanted to find out how Mojave dynamic wallpapers worked. NSHipster and ole reverse engineered the file format. In the Twitter thread, NSHipster mentions an edge case: What happens above 66ºN (latitude)?

The first thing to do was find out what process handles the wallpaper on macOS. I primarily do iOS research, and honestly had no idea. I opened Console, searched for "solar", and then changed my static wallpaper to a dynamic one. Voila!

Message: index: 7 next: 14815.999366

Process: Dock

@bradtraversy
bradtraversy / webdev_online_resources.md
Last active April 7, 2025 16:27
Online Resources For Web Developers (No Downloading)
@phanirithvij
phanirithvij / app.py
Created July 2, 2018 11:59 — forked from liulixiang1988/app.py
upload multiple files in Flask
import os
# We'll render HTML templates and access data sent by POST
# using the request object from flask. Redirect and url_for
# will be used to redirect the user once the upload is done
# and send_from_directory will help us to send/show on the
# browser the file that the user just uploaded
from flask import Flask, render_template, request, redirect, url_for, send_from_directory
from werkzeug import secure_filename
# Initialize the Flask application