Skip to content

Instantly share code, notes, and snippets.

function listProperties(obj, objStr, option){
var getPropertyNames = function(obj){
var keys = [];
for(var key in obj){
keys.push(key);
}
return keys;
};
var func = getPropertyNames;

Godot - Python interaction

I need to call some specific Python code which is not easy to implement as Godot code and came up with this solution. Note that the essence of the script is that the Python code generates a dictionary with the required information and prints this as a JSON formatted string. Godot calls the script and receives the output and uses the internal JSON functionality to convert the string to a Godot JSON object. Also note that the Python script gets called from the python version that is set in the environment specific for this Python code (python-venv).

Not too difficult actually!

Python code

import sys
<h2>How to install userstyles in FX 57+?</h2>
<ol><li>Go to <b>about:support</b>, click the button <b>Open folder</b></li>
<li>Create a folder called <b>chrome</b>, inside that make an empty text file called <b>userChrome.css</b> (make sure it doesn't end with .txt!)</li>
<li>Select the style options you want, then click <b>Show CSS code</b>, copy the field contents</li>
<li>Paste the contents to the userChrome.css file and save it. Make sure the <i>@namespace</i> row appears only once, at the beginning!</li>
<li>Restart Firefox to see the changes.</li></ol>
If you already have the file, simply open it and add new code to the end (tutorial steps 3-5).
@Madis0
Madis0 / bing-ai-firefox.md
Last active May 1, 2024 21:13
Bing Chat AI on Android with Firefox

This process simply makes websites think your browser is Microsoft Edge. This is harmless and can be reverted at any time by deleting the entry you created on about:config.

  1. Get Firefox
  2. Go through its initial setup
  3. Enter about:config to address bar
    • Make sure to go to that URL, not search it!
  4. On top left corner, tap ➕ and fill the following in order:
    • general.useragent.override
    • string
  • Mozilla/5.0 (Linux; Android) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Mobile Safari/537.36 EdgA/113.0.0.0
@mrk-han
mrk-han / emulator-install-using-avdmanager.md
Last active May 1, 2024 21:12
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architecture (for an M1/M2 Macbook):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-30;google_atd;arm64-v8a"

Design your own YouTube app with Firefox and extensions!

Install Firefox and Extensions

  1. Install Firefox, Firefox Beta or Firefox Nightly for Android.
    • The goal is to install a separate version which you do not use for general browsing, but it is up to you which edition to choose.
  2. Go to SettingsAbout Firefox (Beta/Nightly)
  3. Tap 3 times on the logo
  4. Go back → Custom Add-on collection
  5. Enter 3124145 and youtube accordingly.
@dineshsprabu
dineshsprabu / dynamic_page_downloader.js
Last active May 1, 2024 21:12
[PhantomJS] Load and save dynamic webpage
#!/usr/bin/phantomjs
// This script will load a dynamic page and gives you the content.
// Args: url -> URL to be downloaded.
var system = require('system');
if(system.args.length == 1){
system.stderr.write("Pass URL as argument to the script");
phantom.exit(1)
@eduard-sukharev
eduard-sukharev / cue_to_flac.py
Last active May 1, 2024 21:11 — forked from Theldus/cue_to_flac.py
CUE splitter using ffmpeg (to flac)
import os
import subprocess
import sys
from itertools import chain
import argparse
parser = argparse.ArgumentParser(description="Split audio file by .cue metadata.")
parser.add_argument(
"cue-files",
help="CUE file to be parsed. Multiple files can be passed. If no files provided, reads from stdin",
@dineshsprabu
dineshsprabu / chrome_extension_helper.md
Last active May 1, 2024 21:11
[Chrome Extension] Chrome Extension Helper

Get current tab URL

Add below to permissions on manifest

"permissions": [
    "tabs",
 "http://*/*", 
(ns workshop.main
(:require ["package:flutter/material.dart" :as m]
["package:google_fonts/google_fonts.dart" :as fonts]
#_["example.dart" :as ex]
[cljd.flutter.alpha2 :as f]))
(def normal-text-style
(fonts/GoogleFonts.sourceCodePro
.fontSize 26
.fontWeight m/FontWeight.w700