Skip to content

Instantly share code, notes, and snippets.

View rootasjey's full-sized avatar

Jeremie Corpinot rootasjey

View GitHub Profile
@lukepighetti
lukepighetti / dart.yml
Last active June 10, 2022 07:49
Flutter Web + GitHub Actions + Firebase Hosting Preview Channels
# .github/workflows/dart.yml
name: build
on:
push:
branches: [master]
pull_request:
branches: [master]
@rijkerd
rijkerd / getImageDimensions.js
Last active June 2, 2023 21:46
Get dimension of an image object uploaded to firebase storage
const functions = require('firebase-functions');
const mkdirp = require('mkdirp-promise');
const admin = require('firebase-admin');
const { execFile } = require('child-process-promise');
const path = require('path');
const os = require('os');
const fs = require('fs');
admin.initializeApp();
@happyharis
happyharis / firebase_storage.dart
Created January 10, 2020 05:07
Flutter web implemantion of firebase storage
import 'dart:async';
import 'dart:html';
import 'package:flutter/material.dart';
import 'package:firebase/firebase.dart' as fb;
import 'package:firebase/firestore.dart' as fs;
import 'package:linktree_demo_clone/linktree.dart';
class Settings extends StatefulWidget {
@override
@rodydavis
rodydavis / flutter_github_ci.yml
Last active May 30, 2024 00:11
Flutter Github Actions Build and Deploy Web to Firebase Hosting, iOS to Testflight, Android to Google Play (fastlane)
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build_web:
@josephktcheung
josephktcheung / index.ts
Last active November 3, 2022 02:19
Stitching schema with subscription
import { GraphQLServer, Options } from 'graphql-yoga'
import { mergeSchemas } from 'graphql-tools';
import { getRemoteSchema } from "./remoteSchema";
import { SubscriptionClient } from 'subscriptions-transport-ws';
import * as ws from 'ws';
if (process.env.NODE_ENV !== 'production') {
require('dotenv').config()
}
@samme
samme / phaser-scenes-summary.md
Last active August 2, 2023 16:26
Phaser 3 Scenes Summary

Scene control

Calls without a key argument

These affect the calling scene only.

Example:

this.scene.start()

gif-from-tweet

There are so many great GIFs out there and I want to have copies of them. Twitter makes that harder than it should be by converting them to MP4 and not providing access to the source material. To make it easier, I made a bash pipeline that takes a tweet URL and a filename, extracts the MP4 from that tweet and uses ffmpeg to convert back to GIF.

Dependencies

  • ffmpeg
    • macOS: brew install ffmpeg
    • Ubuntu/Debian: apt install ffmpeg
@serg0x
serg0x / material-design-shadows.css
Last active July 7, 2023 13:33
Google material design elevation system shadows as css. Based on https://material.io/design/environment/elevation.html#default-elevations Exported with Sketchapp from the Google material design theme editor plugin "Baseline" theme.
/* Shadow 0dp */
box-shadow: none;
/* Shadow 1dp */
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.20);
/* Shadow 2dp */
box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.20);
/* Shadow 3dp */
@vemarav
vemarav / page_route_builder.dart
Last active November 13, 2023 17:37
Flutter Navigation Fade Transition
Navigator.of(context).push(
new PageRouteBuilder(
pageBuilder: (BuildContext context, _, __) {
return new Notes();
},
transitionsBuilder: (_, Animation<double> animation, __, Widget child) {
return new FadeTransition(
opacity: animation,
child: child
);
@cecilemuller
cecilemuller / launch.json
Last active June 22, 2024 13:33
Run ts-node in VSCode Debugger
{
"version": "0.2.0",
"configurations": [
{
"name": "Example",
"type": "node",
"request": "launch",
"runtimeExecutable": "node",
"runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"],