Skip to content

Instantly share code, notes, and snippets.

@yuripourre
yuripourre / youtube-upload.js
Created April 14, 2024 19:52 — forked from soygul/youtube-upload.js
YouTube video uploader using JavaScript and Node.js
// YouTube API video uploader using JavaScript/Node.js
// You can find the full visual guide at: https://www.youtube.com/watch?v=gncPwSEzq1s
// You can find the brief written guide at: https://quanticdev.com/articles/automating-my-youtube-uploads-using-nodejs
//
// Upload code is adapted from: https://developers.google.com/youtube/v3/quickstart/nodejs
const fs = require('fs');
const readline = require('readline');
const assert = require('assert')
const {google} = require('googleapis');
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Basketball Prototype</title>
<script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
<script src="//cdn.rawgit.com/donmccurdy/aframe-physics-system/v4.0.1/dist/aframe-physics-system.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/donmccurdy/aframe-extras@v6.1.0/dist/aframe-extras.min.js"></script>
<script src="https://d3js.org/d3.v4.min.js"></script>
</head>
@yuripourre
yuripourre / start.sh
Last active April 9, 2024 23:13
Mac Setup
setopt interactivecomments
# The command above allows you to have bash style comments
# Create .zshrc file
touch ~/.zshrc
# Enable git tab for branch completion
echo 'autoload -Uz compinit && compinit' >> ~/.zshrc
# Install Homebrew
public static void onMove(int pointer, Ray ray) {
Pointer p = pointers.get(pointer);
if (p == null) {
p = new Pointer();
p.id = pointer;
pointers.put(pointer, p);
}
for (UIStage stage : stages) {
float px = -1;
@yuripourre
yuripourre / ObjLoader.java
Created April 3, 2022 02:21
ObjLoader with Vertex Color
/*******************************************************************************
* Copyright 2011 See AUTHORS file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@yuripourre
yuripourre / FrustumAABBIntersect.cpp
Created March 19, 2022 06:49 — forked from Kinwailo/FrustumAABBIntersect.cpp
Frustum AABB Intersect
// Returns: INTERSECT : 0
// INSIDE : 1
// OUTSIDE : 2
int FrustumAABBIntersect(Plane *planes, Vector &mins, Vector &maxs) {
int ret = INSIDE;
Vector vmin, vmax;
for(int i = 0; i < 6; ++i) {
// X axis
if(planes[i].normal.x > 0) {
@yuripourre
yuripourre / convertSVGtoEPS.sh
Created January 23, 2022 22:09
Command to convert from svg to vector eps
inkscape file.svg --export-type=eps file.eps --export-ignore-filters --export-ps-level=3
@yuripourre
yuripourre / gist:489bffb09c5782347768ad521bdb53ff
Created January 15, 2021 23:08
Spring JPA GenericSpecification for GROUP BY and WHERE IN
package com.company.jpa;
import org.springframework.data.jpa.domain.Specification;
import javax.persistence.criteria.Expression;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
public class GenericSpecifications<T> {
@yuripourre
yuripourre / script.sh
Created June 26, 2020 03:13
Fedora lightweight
sudo dnf remove evolution
sudo sed -i "s/^#SystemMaxUse.*/SystemMaxUse=50M/g" /etc/systemd/journald.conf
sudo sed -i "s/^#SystemMaxUse.*/SystemMaxUse=50M/g" /etc/systemd/journald.conf
@yuripourre
yuripourre / v4l4j-receipt
Last active August 29, 2015 14:03
V4l4j SliTaz Receipt
# SliTaz package receipt.
PACKAGE="v4l4j"
VERSION="0.1"
CATEGORY="development"
SHORT_DESC="Install v4l4j - A java package to access the Capture interface of the Video4Linux API"
MAINTAINER="yuripourre@gmail.com"
LICENSE="GPLv3"
WEB_SITE="http://code.google.com/p/v4l4j/"