Skip to content

Instantly share code, notes, and snippets.

View RofieSagara's full-sized avatar
👋
Hey there I'm using Github

Rofie Sagara RofieSagara

👋
Hey there I'm using Github
  • Ubersnap
  • Yogyakarta, Indonesia
  • 20:17 (UTC +07:00)
View GitHub Profile
@RofieSagara
RofieSagara / GoogleButton.kt
Created November 10, 2022 08:25
Google login button Blue Android Compose
@Composable
fun GoogleButton(modifier: Modifier = Modifier, text: String = "Sign in with Google", onClick: ()->Unit) {
Row(
modifier = modifier
.background(color = Color(0xFF4285F4))
.height(40.dp)
.clickable { onClick.invoke() }
.padding(1.dp),
horizontalArrangement = Arrangement.Center,
verticalAlignment = Alignment.CenterVertically
<script>
// Based on code from https://stackoverflow.com/questions/59629947/how-do-i-load-an-external-js-library-in-svelte-sapper
import { onMount, createEventDispatcher } from "svelte";
const dispatch = createEventDispatcher();
export let src;
export let libraryDetectionObject;
let script;
onMount(() => {
@iamriajul
iamriajul / GlideImageGetter.kt
Last active October 16, 2023 05:48
Custom Html.ImageGetter to load images in TextView HTML tags using Glide
/*
* Based on java code by Yaser Rajabi https://gist.github.com/yrajabi
*/
package org.dailyislam.android.utils.extenstions
import android.graphics.Bitmap
import android.graphics.Canvas
import android.graphics.drawable.BitmapDrawable
import android.graphics.drawable.Drawable
import android.text.Html.ImageGetter
@loretoparisi
loretoparisi / ffmpeg_frames.sh
Last active November 14, 2024 05:43
Extract all frames from a movie using ffmpeg
# Output a single frame from the video into an image file:
ffmpeg -i input.mov -ss 00:00:14.435 -vframes 1 out.png
# Output one image every second, named out1.png, out2.png, out3.png, etc.
# The %01d dictates that the ordinal number of each output image will be formatted using 1 digits.
ffmpeg -i input.mov -vf fps=1 out%d.png
# Output one image every minute, named out001.jpg, out002.jpg, out003.jpg, etc.
# The %02d dictates that the ordinal number of each output image will be formatted using 2 digits.
ffmpeg -i input.mov -vf fps=1/60 out%02d.jpg
@balachandarlinks
balachandarlinks / Dockerfile
Last active November 27, 2020 14:20
Dockerfile for https://github.com/gojuno/mainframer remote android build system.
FROM ubuntu:16.04
MAINTAINER Balachandar KM "[email protected]"
# Install java7
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:webupd8team/java && \
(echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections) && \
apt-get update && \
@ygotthilf
ygotthilf / jwtRS256.sh
Last active November 7, 2024 10:42
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@maxd
maxd / modena.css
Last active November 12, 2024 13:56
modena.css from JDK 10.0.1
/*
* Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*