Skip to content

Instantly share code, notes, and snippets.

View rickyManalo's full-sized avatar
🙃

halfBlue3 rickyManalo

🙃
View GitHub Profile
using System;
using System.IO;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.AI;
@juanbrujo
juanbrujo / PlayStationBIOSFilesNAEUJP.md
Last active May 9, 2024 22:00
Files for PlayStation BIOS Files NA-EU-JP
@heaversm
heaversm / skyboxstereo.shader
Created September 5, 2018 16:24
Unity Skybox Stereo Shader
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
Shader "Skybox/CubemapStereo" {
Properties {
_Tint ("Tint Color", Color) = (.5, .5, .5, .5)
[Gamma] _Exposure ("Exposure", Range(0, 8)) = 1.0
_Rotation ("Rotation", Range(0, 360)) = 0
[NoScaleOffset] _TexLeft ("Cubemap (HDR)", Cube) = "grey" {}
[NoScaleOffset] _TexRight ("Cubemap (HDR)", Cube) = "grey" {}
}
@titoaesj
titoaesj / .kt
Last active March 17, 2024 22:22
Android convert int to dp
OBS: O var_number_int é a varável que recebera o valor a ser convertido em DP
(int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, var_number_int, getResources().getDisplayMetrics())
##KOTLIN
val Int.dp: Int
get() = (this * Resources.getSystem().displayMetrics.density + 0.5f).toInt()
val Float.dp: Int
@arxdsilva
arxdsilva / tokenGeneratorExample.go
Last active March 22, 2024 06:23
Golang - How to generate a random Token
package main
// https://play.golang.org/p/5VsRVVtyo-J
import (
"crypto/rand"
"fmt"
)
func tokenGenerator() string {
@laaptu
laaptu / DpToPxAndPxToDp
Last active February 14, 2022 21:06
Android convert dp to px and vice versa
public static float convertPixelsToDp(float px){
DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics();
float dp = px / (metrics.densityDpi / 160f);
return Math.round(dp);
}
public static float convertDpToPixel(float dp){
DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics();
float px = dp * (metrics.densityDpi / 160f);
return Math.round(px);
@CiTuX
CiTuX / bottom_stroke.xml
Last active June 21, 2023 03:51
Android xml drawable with a bottom stroke
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:top="-6dp"
android:left="-6dp"
android:right="-6dp"
android:bottom="0dp">
<shape android:shape="rectangle">
<solid android:color="#88FFFF00"/>