Skip to content

Instantly share code, notes, and snippets.

@JohannesMP
JohannesMP / EnableDiscordDevExperiments.md
Last active October 28, 2025 03:30 — forked from ExordiumX/betaenabler.js
Enabling Discord Dev Experiments on Discord for Windows (2022-02)

Enable Dev Experiments in Discord for Windows

image

This guide shows how to enable dev mode for the Discord desktop application running on Windows (as of February 2022).

This can be used to view beta experiments to try features currently in development that are included but hidden by default in Discord release builds.


@prabindh
prabindh / dirlist_creator.py
Created May 4, 2019 02:56
Create directory listing tree in python and output in JSON
import os
import json
def path_to_dict(path):
d = {'name': os.path.basename(path)}
if os.path.isdir(path):
d['type'] = "directory"
d['children'] = [path_to_dict(os.path.join(path,x)) for x in os.listdir\
(path)]
else:
@mohanramphp
mohanramphp / DateTime.js
Created January 9, 2019 08:52
DateTime Component using React hooks
import React, { useState, useEffect } from 'react';
export const DateTime = () => {
const [dateTime, setDateTime] = useState(new Date());
useEffect(() => {
const id = setInterval(() => setDateTime(new Date()), 1000);
return () => {
clearInterval(id);
}
@m3ftah
m3ftah / Create AVD and run the emulator
Created November 21, 2017 08:26
Minimize the Android emulator used memory and disk size
#You can find the docker image in https://hub.docker.com/r/m3ftah/androfleet-emulator/ and the source code : https://github.com/m3ftah/androfleet/tree/restart/docker/androfleet-emulator
ANDROID_HOME="/opt/android-sdk-linux"
ANDROID_SDK_HOME="${ANDROID_HOME}"
PATH="${PATH}:${ANDROID_SDK_HOME}/tools:${ANDROID_SDK_HOME}/platform-tools"
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
cd /tmp && \
curl -O https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz && \
cd /opt && tar xzf /tmp/*.tgz && rm /tmp/*.tgz
# -*- coding:utf-8 -*-
# !/usr/bin/env python3
'''
Author: ayasakinagi
Email: xyz.wang@outlook.com
环境: Python3
依赖: deluge_client
使用: 修改host, port, username, password, limitSize, dataPath变量
@nicolasdao
nicolasdao / open_source_licenses.md
Last active November 27, 2025 22:24
What you need to know to choose an open source license.
@loretoparisi
loretoparisi / ffmpeg_frames.sh
Last active December 17, 2024 15:17
Extract all frames from a movie using ffmpeg
# Output a single frame from the video into an image file:
ffmpeg -i input.mov -ss 00:00:14.435 -vframes 1 out.png
# Output one image every second, named out1.png, out2.png, out3.png, etc.
# The %01d dictates that the ordinal number of each output image will be formatted using 1 digits.
ffmpeg -i input.mov -vf fps=1 out%d.png
# Output one image every minute, named out001.jpg, out002.jpg, out003.jpg, etc.
# The %02d dictates that the ordinal number of each output image will be formatted using 2 digits.
ffmpeg -i input.mov -vf fps=1/60 out%02d.jpg
@dingzeyuli
dingzeyuli / check_github_repo_size
Created December 16, 2016 22:34
Check the size of a github repo before downloading
# http://webapps.stackexchange.com/questions/39587/view-estimated-size-of-github-repository-before-cloning
# tested on macOS
echo https://github.com/torvalds/linux.git | perl -ne 'print $1 if m!([^/]+/[^/]+?)(?:\.git)?$!' | xargs -I{} curl -s -k https://api.github.com/repos/'{}' | grep size
# output:
# "size": 1746294,
@qreeves
qreeves / PROF_SAVE_profile
Created June 9, 2016 04:02
Mirror's Edge Catalyst - PROF_SAVE_profile example
// See this post for more information:
// > https://forums.mirrorsedge.com/discussion/1976/a-very-low-setting-for-pc-users
// User.cfg gist:
// > https://gist.github.com/qreeves/5bd5c31a17060ce69c8091bcd47bb4aa/edit
// Replace the parts in this file with your "Mirror's Edge Catalyst" user settings:
// > default: "Documents\Mirror's Edge Catalyst\settings\PROF_SAVE_profile"
// If you get "Out of Memory" errors, try increasing your page file to a fixed size of 8 to 12 GB
// > http://windows.microsoft.com/en-au/windows/change-virtual-memory-size
// DISCLAIMER: This content is provided on an "as-is" basis. I accept no liability if this cooks your computer, blows up a shopping mall, robs you of your free will, or any other adverse effects of any kind.
GstRender.AmbientOcclusion 0