Skip to content

Instantly share code, notes, and snippets.

View hugo4715's full-sized avatar
😁
Always coding

hugo4715

😁
Always coding
View GitHub Profile
0f3909527e73ad93b73b070bb12cde1292bbcde5
0f3919527e73ad93b73b070bb12cde1292bbcde5
0f3929527e73ad93b73b070bb12cde1292bbcde5
0f3939527e73ad93b73b070bb12cde1292bbcde5
0f3949527e73ad93b73b070bb12cde1292bbcde5
0f3959527e73ad93b73b070bb12cde1292bbcde5
0f3969527e73ad93b73b070bb12cde1292bbcde5
0f3979527e73ad93b73b070bb12cde1292bbcde5
0f3989527e73ad93b73b070bb12cde1292bbcde5
0f3999527e73ad93b73b070bb12cde1292bbcde5
@unitycoder
unitycoder / RayBoxIntersectFast.cs
Last active October 5, 2022 21:07
RayBoxIntersect Faster than bounds.IntersectRay
// this is faster than unity *.bounds.IntersectRay(ray)
// original source https://gamedev.stackexchange.com/a/103714/73429
float RayBoxIntersect(Vector3 rpos, Vector3 rdir, Vector3 vmin, Vector3 vmax)
{
float t1 = (vmin.x - rpos.x) / rdir.x;
float t2 = (vmax.x - rpos.x) / rdir.x;
float t3 = (vmin.y - rpos.y) / rdir.y;
float t4 = (vmax.y - rpos.y) / rdir.y;
float t5 = (vmin.z - rpos.z) / rdir.z;
@mrbar42
mrbar42 / README.md
Last active June 24, 2024 12:40
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8

Keybase proof

I hereby claim:

  • I am hugo4715 on github.
  • I am hugo4715 (https://keybase.io/hugo4715) on keybase.
  • I have a public key whose fingerprint is 1578 491A 87A8 85CC 507F 5B09 E1C8 B51C D252 1ED0

To claim this, I am signing this object:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>${artifactId}</artifactId>
<groupId>${groupId}</groupId>
<version>${version}</version>
<!-- Repositories -->
<repositories>
//main.js
harvester = require("harvester.js")
upgrader = require("upgrader.js")
harvester()
upgrader()
//harvester.js
function() {
@ron4stoppable
ron4stoppable / Migration Create Sessions
Last active June 28, 2018 11:07 — forked from harris21/Migration Create Sessions
Create CodeIgniter Sessions Migration
class Migration_Create_Sessions extends CI_Migration {
// The session table structure changed for CI 3.0
public function up()
{
$fields = array(
'id VARCHAR(40) DEFAULT \'0\' NOT NULL',
'ip_address VARCHAR(45) DEFAULT \'0\' NOT NULL',
'timestamp INT(10) unsigned DEFAULT 0 NOT NULL',
'data blob NOT NULL'
import org.bukkit.Bukkit;
import org.bukkit.entity.LivingEntity;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public class AIUtils {
private static Field fromMobSpawner;
private static Method getHandle;
@zyuiop
zyuiop / README.MD
Last active April 2, 2023 11:40
A simple tool to manage scoreboards in minecraft (lines up to 48 characters !). /

About

This class allow you to use a scoreboard as a sign in which you can write any text. It is designed to be used with a CraftBukkit server (or any similar variant). It uses fake teams to allow lines that are longer than usernames.

Other versions