Skip to content

Instantly share code, notes, and snippets.

@eldrichgaiman
eldrichgaiman / tangela.svg
Created April 23, 2024 15:21
Tangela random tangle
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active April 27, 2024 19:01
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@krzemienski
krzemienski / dash_and_hls_cenc_cbcs_multi_codec_packaging_shaka_bento4.py
Created September 2, 2020 21:19
Packaging multi codec DASH and HLS with cenc and cbcs encryption for widevine, playready, and fairplay w/ shaka & bento4
def package_local_targets(input_dir, output_dir):
trace = 'package_local_targets'
os.chdir(input_dir)
try:
print(f"{trace}: create directory {output_dir}")
os.makedirs(output_dir)
except FileExistsError:
print(f"delete existing {output_dir}")
shutil.rmtree(output_dir)
@trfiladelfo
trfiladelfo / CPFValidator.kt
Last active April 27, 2024 18:59
Validador de CPF em Kotlin
fun isCPF(document: String): Boolean {
if (document.isEmpty()) return false
val numbers = document.filter { it.isDigit() }.map {
it.toString().toInt()
}
if (numbers.size != 11) return false
//repeticao
@arkatsy
arkatsy / zustand-internals.jsx
Last active April 27, 2024 18:57
How zustand works internally
import { useSyncExternalStore } from "react";
// For more on the useSyncExternalStore hook, see https://react.dev/reference/react/useSyncExternalStore
// The code is almost identical to the source code of zustand, without types and some features stripped out.
// Check the links to see the references in the source code.
// The links are referencing the v5 of the library. If you plan on reading the source code yourself v5 is the best way to start.
// The current v4 version contains lot of deprecated code and extra stuff that makes it hard to reason about if you're new to this.
// https://github.com/pmndrs/zustand/blob/fe47d3e6c6671dbfb9856fda52cb5a3a855d97a6/src/vanilla.ts#L57-L94
function createStore(createState) {
@MWins
MWins / project-ideas01.md
Last active April 27, 2024 18:54
Back end Projects - list

Project Ideas

Ok. I'm going to list off some ideas for projects. You will have to determine if any particular idea is good enough to include in a portfolio. These aren't creative ideas. They likely already exist. Some are way too advanced while others are simplistic.

I will recommend to post any project you make to github and make a github project page for it. Explain in as much detail as possible how you made it, how it can be improved etc. Document it.

If you pick an advanced idea, setup a development roadmap and follow it. This will show some project management skills.

Another piece of advice for those who are design challenged. Use different front end frameworks and use different themes for those frameworks to provide appealing designs without looking like yet another bootstrap site.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 27, 2024 19:03
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active April 27, 2024 18:51
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@GusGA
GusGA / pt_guide.md
Last active April 27, 2024 18:47
Guía de configuración de equipos en packet tracer

Script de comandos de packet tracer

Equipo Switch

Entrar en modo EXEC privilegiado

Ejecutar el comando enable

Switch> enable