Skip to content

Instantly share code, notes, and snippets.

View enricocid's full-sized avatar
🚽
focusing

Enrico D'Ortenzio enricocid

🚽
focusing
  • None Island
  • Europe/Italy
  • 15:59 (UTC +02:00)
View GitHub Profile
@whitead
whitead / fetch_pdb.py
Last active May 2, 2022 08:38
Here's a python function that goes from search string (like "human albumin") and returns a pdb file using @rcsbPDB's top result.
import requests
import tempfile
def get_pdb(query_string):
url = "https://search.rcsb.org/rcsbsearch/v1/query"
query = {
"query": {
"type": "terminal",
"service": "full_text",
"parameters": {"value": query_string},
},
@ArthurNagy
ArthurNagy / RoundedBottomSheetDialogFragment.kt
Last active August 5, 2025 08:12
Rounded modal bottom sheet as seen in new Google products(Tasks, News, etc.), described in this article: https://medium.com/halcyon-mobile/implementing-googles-refreshed-modal-bottom-sheet-4e76cb5de65b
package com.your.package
import android.app.Dialog
import android.os.Bundle
import com.your.package.R
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
/**
* BottomSheetDialog fragment that uses a custom
@jquerius
jquerius / ActivityFragmentExample.kt
Last active May 3, 2021 22:14
Kotlin Fragment to Activity Communication Example
class ExampleFragment : Fragment() {
// this is the instance of our parent activity's interface that we define here
private var mListener: OnFragmentInteractionListener? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}
fun onButtonPressed(uri: Uri) {
if (mListener != null) {
mListener!!.onFragmentInteraction(uri)
@jamesmacwhite
jamesmacwhite / ffmpeg_mkv_mp4_conversion.md
Last active July 11, 2025 10:08
Easy way to convert MKV to MP4 with ffmpeg

Converting mkv to mp4 with ffmpeg

Essentially just copy the existing video and audio stream as is into a new container, no funny business!

The easiest way to "convert" MKV to MP4, is to copy the existing video and audio streams and place them into a new container. This avoids any encoding task and hence no quality will be lost, it is also a fairly quick process and requires very little CPU power. The main factor is disk read/write speed.

With ffmpeg this can be achieved with -c copy. Older examples may use -vcodec copy -acodec copy which does the same thing.

These examples assume ffmpeg is in your PATH. If not just substitute with the full path to your ffmpeg binary.

Single file conversion example

@rxaviers
rxaviers / gist:7360908
Last active August 5, 2025 06:02
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue: