Skip to content

Instantly share code, notes, and snippets.

@msenol86
msenol86 / rec_dict_sort.py
Last active October 4, 2024 08:46
Sort Dict (JSON)
import json
JSON_VALUE = list | dict | str | int | float
def rec_sort(dict_or_list_or_value: JSON_VALUE) -> JSON_VALUE:
if type(dict_or_list_or_value) is dict:
ret_dict = {}
for k in sorted(dict_or_list_or_value.keys()):
ret_dict[k] = rec_sort(dict_or_list_or_value[k])
alert("test csp");
import urllib.request
import re
EMOJI_TEST_FILENAME = "emoji-test.txt"
EMOJI_DATA_URL = "https://unicode.org/Public/emoji/16.0/emoji-test.txt"
def download_latest_emoji_test_data() :
response = urllib.request.urlopen(EMOJI_DATA_URL)
emoji_test_file = response.read()
with open(EMOJI_TEST_FILENAME, "wb") as tmp_file:
@msenol86
msenol86 / PKGBUILD
Last active April 22, 2025 18:50 — forked from springzfx/PKGBUILD
Fix copytoclipboard in deepin-screenshot by using xclip
# Maintainer: Felix Yan <[email protected]>
# Contributor: Josip Ponjavic <josipponjavic at gmail dot com>
# Contributor: Xu Fasheng <fasheng.xu[AT]gmail.com>
# Contributor: Mucahit Senol <mucahitsenol86 at gmail dot com>
pkgname=deepin-screenshot
pkgver=5.0.0
pkgrel=1
pkgdesc="Easy-to-use screenshot tool for linuxdeepin desktop environment"
arch=('x86_64')
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.bilgisocial.mykotlinapplication.MainActivity">
@msenol86
msenol86 / gist:827aed4fc1f845145b72
Last active February 1, 2016 21:49
My Kotlin Android Gradle File
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.bilgisocial.mykotlinapplication"
minSdkVersion 19