Skip to content

Instantly share code, notes, and snippets.

View hjoseph96's full-sized avatar

Herbert Joseph hjoseph96

  • Queens, NY
  • 19:54 (UTC -05:00)
View GitHub Profile
https://www.instagram.com/mateoconstruction4914/
https://www.instagram.com/nyegcorp/
https://www.instagram.com/copperfield_electric/
https://www.instagram.com/rayderzhang/
https://www.instagram.com/rcstudio.rc/
https://www.instagram.com/masongencontracting/
https://www.instagram.com/rknyconstructioncorp/
https://www.instagram.com/hms_construction_llc/
https://www.instagram.com/construction_u_s_a_/
https://www.instagram.com/electrical_with_gopi/
@lTyl
lTyl / AudioSampler.cs
Created January 1, 2022 08:48
Simple script which can be used to update the state of an object (like animation) depending on AudioSource outout
using System;
using System.Collections;
using UnityEngine;
namespace SMS.Tools
{
public class AudioSampleData
{
public float rootMeanSquared;
@markv12
markv12 / DelegateExamples.cs
Last active February 20, 2025 14:55
C# Action Func Predicate Examples
using System;
public class DelegateExamples
{
public void Run()
{
Action action1 = delegate { /*Do something*/ };
action1();
FunctionWithOnComplete(action1);
@abelorian
abelorian / agora.rb
Last active June 20, 2024 20:37
Agora dynamic Key ruby RTC example. Gem agora_dynamic_key https://rubygems.org/gems/agora_dynamic_key
# In Gemfile: gem 'agora_dynamic_key', '~> 0.1.0'
require 'dynamic_key'
class Agora
EXPIRATION_TIME_IN_SECONDS = 3600*3
def generate_rtc_token channel_name = 'any_channel_name'
params = {
@ditzel
ditzel / MathParabola.cs
Last active October 7, 2026 06:35
A simple Math class to calculate a point in 2D or 3D space lying on a parabola. And a more complex parabola controller that you can put on an object.
using UnityEngine;
using System;
public class MathParabola
{
public static Vector3 Parabola(Vector3 start, Vector3 end, float height, float t)
{
Func<float, float> f = x => -4 * height * x * x + 4 * height * x;
@nikneroz
nikneroz / Guardian JWT.md
Last active November 16, 2026 22:35
Elixir + Phoenix Framework + Guardian + JWT. This is tutorial and step by step installation guide.

Elixir + Phoenix Framework + Guardian + JWT + Comeonin

Preparing environment

We need to generate secret key for development environment.

mix phoenix.gen.secret
# ednkXywWll1d2svDEpbA39R5kfkc9l96j0+u7A8MgKM+pbwbeDsuYB8MP2WUW1hf

Let's generate User model and controller.

@shiroyasha
shiroyasha / dog.rb
Created February 16, 2016 22:20
Method tracer for Ruby classes
class Dog
attr_writer :name
def initialize(name)
@name = name
end
def bark
puts "patrick"
end
@janko
janko / 01-activerecord.rb
Created May 27, 2015 22:50
PostgreSQL JSON querying in Sequel (my presentation from our local Ruby meetup)
require "active_record"
ActiveRecord::Base.establish_connection('postgres:///testing')
ActiveRecord::Migration.verbose = false
ActiveRecord::Migration.class_eval do
create_table :played_quizzes, force: true do |t|
t.integer :player_ids, array: true
t.json :quiz_snapshot
end
@voter101
voter101 / Gulpfile.js
Last active October 16, 2024 17:37
Gulpfile for Rails application with replaced Sprockets with Gulp
'use strict'
var gulp, sass, babelify, browserify, watchify, source, util;
gulp = require('gulp');
sass = require('gulp-sass');
babelify = require('babelify')
browserify = require('browserify');
watchify = require('watchify');
source = require('vinyl-source-stream');