Skip to content

Instantly share code, notes, and snippets.

View tinrab's full-sized avatar
🤓
I may be slow to respond.

Tin Rabzelj tinrab

🤓
I may be slow to respond.
View GitHub Profile
@tinrab
tinrab / designer.html
Created November 7, 2014 18:01
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
@tinrab
tinrab / util.cs
Last active September 18, 2015 01:49
Unity android is package installed
bool IsPackageInstalled(string packageName)
{
#if UNITY_ANDROID
var pluginClass = new AndroidJavaClass("android.content.pm.PackageManager");
var jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
var currentActivity = jc.GetStatic<AndroidJavaObject>("currentActivity");
var packageManager = currentActivity.Call<AndroidJavaObject>("getPackageManager");
int flag = pluginClass.GetStatic<int>("GET_META_DATA");
var packages = packageManager.Call<AndroidJavaObject>("getInstalledApplications", flag);
@tinrab
tinrab / Dockerfile
Created November 25, 2023 00:25
Example Dockerfile for turbo-based monorepo with Next.js and sharp for image processing
FROM node:20.10-bullseye-slim as base
# Install dependencies only when needed
FROM base AS deps
WORKDIR /workspace
# Install libvips
# Credit: https://hub.docker.com/r/shivjm/node-libvips
ARG LIBVIPS_VERSION=8.15.0
RUN apt-get update -qq && \
@tinrab
tinrab / action.ts
Last active May 5, 2024 18:59
Calling server actions in client form components
'use server';
export const signUpAction = apiAction(
signUpFormSchema,
async (data): Promise<{ }> => {
// ...
},
);