Skip to content

Instantly share code, notes, and snippets.

View allansrc's full-sized avatar
🇧🇷
from Home to the World

Allan Ramos allansrc

🇧🇷
from Home to the World
View GitHub Profile
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@lopspower
lopspower / README.md
Last active April 17, 2025 19:49
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@EmadAdly
EmadAdly / install-android-sdk-in-ubuntu.md
Last active April 10, 2025 13:35
install JDK and Android SDK on Linux Ubuntu

install openjdk

sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk
@marcusedu
marcusedu / install_flutter_on_windows.bat
Last active October 17, 2020 13:46
Script que baixa e instala o chocolatey, dart-sdk, android studio e o git, depois clona o flutter na pasta src da raiz do disco e inicializa o Flutter doctor.
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
choco install dart-sdk androidstudio git
cd \
mkdir src
cd \src
git clone https://github.com/flutter/flutter.git
cd flutter
start bin/flutter.bat doctor
start flutter_console.bat
@echo off
const podcasts = [
{
"id": 1,
"title": "RocketCast",
"cover": "https://s3-sa-east-1.amazonaws.com/gonative/cover1.png",
"tracks": [
{
"id": "0",
"title": "Papercut",
"artist": "Linkin Park",
enum OrderType { asc, desc, sad }
String enumToString(dynamic enumValue) =>
enumValue.toString().replaceAll(RegExp(r"^.*?\."), "");
E stringToEnum<E>(List<E> values, String target, [E defaultIfNoMatch]) {
return values.firstWhere((enm) => enumToString(enm) == target,
orElse: () => defaultIfNoMatch);
}
@akitaonrails
akitaonrails / links.md
Created November 6, 2019 01:28
Links de referência pro Episódio 66 do Canal Akitando
@gagarine
gagarine / win11-mouse-scroll-reverse.md
Last active April 17, 2025 19:29
Reverse Mouse Wheel scroll in Windows 11 (Natural Mode like MacOS)

Reverse Mouse Wheel scroll in Windows 11

Chose between natural mode like MacOS or Windows default mode.

Step 1: Open Windows PowerShell in Administrator Mode.

You can do this by going to Start Menu, type PowerShell, and click Run as Administrator.

Step 2: Copy the following code and paste it in the command line of Windows PowerShell:

$mode = Read-host "How do you like your mouse scroll (0 or 1)?"; Get-PnpDevice -Class Mouse -PresentOnly -Status OK | ForEach-Object { "$($_.Name): $($_.DeviceID)"; Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\$($_.DeviceID)\Device Parameters" -Name FlipFlopWheel -Value $mode; "+--- Value of FlipFlopWheel is set to " + (Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\$($_.DeviceID)\Device Parameters").FlipFlopWheel + "`n" }
@marcusedu
marcusedu / mfa_validator_input.dart
Last active February 27, 2024 20:24
A simple MFA Validator Input, with custom length code.
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class MfaValidatorInput extends StatefulWidget {
const MfaValidatorInput({
super.key,
required this.length,
this.onCompleted,
this.onChanged,
this.focusNode,
@akitaonrails
akitaonrails / build_ffmpeg_command.py
Created November 5, 2024 02:24
Try to convert Netflix videos into an open MKV format
# Procedure:
# - download the episodes you want from the Android Netflix app (there is a limit)
# - connect your smartphone to your PC and navigate to Internal Storage/Android/data/com.netflix.mediaclient/Download/.of.
# - fetch each directory (each directory is one episode)
#
# Each directory should have the following file formats:
# - .nfv - the video stream, possibly already in H.264, unencrypted
# - .nfa - the most difficult file to deal with, it's an unencrypted AAC file in ISO fMP4 (fragmented) format and an unknown "object type 42" that ffmpeg complains
# - .nfs - subtitle in TTML format with custom properties.
# - .nfi - information about the download (unknown format)