Skip to content

Instantly share code, notes, and snippets.

@blehr
blehr / accelerometer.dart
Created July 5, 2019 17:18
Using the Accelerometer in Flutter
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:sensors/sensors.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@HirbodBehnam
HirbodBehnam / ffmpeg-scripts.sh
Last active March 29, 2024 12:55
FFMpeg scripts I use to convert videos
# Simple FFMPEG scripts I use to convert videos or audios
# The ones with h264_nvenc codec only work with NVidia graphic cards. You also need to install the drives to use them
# The hevc_nvenc codec is pretty fast but the output file size is terrible. So I won't include that in. (Special thanks to Erfan Mojibi)
# The libx265 provides better quality to file size. So we can increase the crf in it (source: https://trac.ffmpeg.org/wiki/Encode/H.265#ConstantRateFactorCRF)
# The tag is provided by @alirezahabib
# Simple convert from webm to mp4. ACC audio codec at 128kb/s. Change 24 to change the quality (higher is worse)
ffmpeg -i in.webm -r 10 -vf "scale=-2:720" -c:v h264_nvenc -cq:v 24 -profile:v high -c:a aac -b:a 128k -strict experimental out.mp4
ffmpeg -i in.webm -r 10 -vf "scale=-2:720" -c:v libx264 -crf 24 -c:a aac -b:a 128k -strict experimental out.mp4
ffmpeg -i in.webm -r 10 -vf "scale=-2:720" -c:v libx265 -crf 28 -c:a aac -b:a 128k -tag:v hvc1 -strict experimental out.mp4
@malteneuss
malteneuss / Dockerfile
Created April 28, 2022 19:43
Nextjs + Prisma DB (query and migrations) in Docker
# Adapted from https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile
# Install dependencies only when needed
FROM node:16-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
# Rebuild the source code only when needed
@AlexMerzlikin
AlexMerzlikin / UniversalRenderPipelineTemplateWithDotsInstancing.shader
Last active March 29, 2024 12:50
Template unlit URP shader that supports DOTS instancing to use as a guide to create shaders for BatchRendererGroup since BRG only works with DOTS instancing compatible shaders. Unfortunately, the official docs about it haven't helped me that much, and I thought others might face the same issues.
Shader "Universal Render Pipeline/Custom/UnlitWithDotsInstancing"
{
Properties
{
_BaseMap ("Base Texture", 2D) = "white" {}
_BaseColor ("Base Colour", Color) = (1, 1, 1, 1)
}
SubShader
{
@MaxySpark
MaxySpark / fmovies-9anime.user.js
Last active March 29, 2024 12:48
User Script to Get Direct Download Link of Movie Series and Anime from http://fmovies.to and http://9anime.to . First install "TAMPERMONKEY" OR "GREASEMONKEY" extention/plugin in your browser
// ==UserScript==
// @name Direct Download From fmovies
// @namespace http://maxyspark.com/
// @version 0.1
// @description Direct Download From fmovies
// @author MaxySpark
// @match http://fmovies.to/*
// @match https://fmovies.to/*
// @match http://9anime.to/*
// @grant none
@avidale
avidale / create_rut5-base.ipynb
Created April 30, 2021 21:51
create_rut5-base.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@HungryProton
HungryProton / depth_override_shader.gdshader
Last active March 29, 2024 12:45
A Godot 4 shader to make things appear on top of other things within a range.
// A Godot 4 shader to make things appear on top of other things within a range.
// Initially, this was made so my characters' facial features would be rendered on top of their hair.
shader_type spatial;
render_mode unshaded;
uniform sampler2D depth_texture : hint_depth_texture, repeat_disable, filter_nearest;
// Maximum depth we can overdraw relative to the object original depth, in ENGINE UNITS.
@rxaviers
rxaviers / gist:7360908
Last active March 29, 2024 12:42
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: