Skip to content

Instantly share code, notes, and snippets.

View elersong's full-sized avatar
📱
Working on two service apps as personal projects. Open to collaborators.

Grey Elerson elersong

📱
Working on two service apps as personal projects. Open to collaborators.
  • Operational Systems, Inc.
  • Salt Lake City, UT
View GitHub Profile
<!DOCTYPE html>
<html>
<head><title>SOUND</title></head>
<body>
<div>Frequence: <span id="frequency"></span></div>
<script type="text/javascript">
var audioCtx = new (window.AudioContext || window.webkitAudioContext)();
var oscillatorNode = audioCtx.createOscillator();
var gainNode = audioCtx.createGain();
@itay-grudev
itay-grudev / path_helper.rb
Last active October 17, 2018 18:24
Rails Current Page Helper
module PathHelper
##
# Checks whether you are on the specified page
#
# @param matchers A comma separated list of matchers.
# @param returnval Return value if the page matches or nil. Defaults to true.
# @return [mixed] returnval (usually truthy) on success or nil on failure.
#
# @example Check if you are on Article#show
@gbuesing
gbuesing / ml-ruby.md
Last active February 28, 2024 15:13
Resources for Machine Learning in Ruby

UPDATE a fork of this gist has been used as a starting point for a community-maintained "awesome" list: machine-learning-with-ruby Please look here for the most up-to-date info!

Resources for Machine Learning in Ruby

Gems

@theikkila
theikkila / keywords.json
Last active November 24, 2021 14:21
7000 skill keywords
[
"Automotive",
"Budgeting",
"HVAC",
"Heaters",
"Hydraulics",
"Logistics Management",
"Management",
"Negotiation",
"Project Planning",
@bluesmoon
bluesmoon / README.md
Last active February 15, 2022 12:43
Pseudo-Random number generator that follows a Normal or Log-Normal distribution.

Marsaglia-polar.js

This script generates random numbers along a Normal or Log-normal distribution using the Marsaglia polar method.

There are four functions you can use:

  • normalRandom: Generate random numbers that follow a Normal distribution.
  • normalRandomInRange: Generate random numbers that follow a Normal distribution but are clipped to fit within a range
  • normalRandomScaled: Generate random numbers that follow a Normal distribution with a given mean and standard deviation
  • lnRandomScaled: Generate random numbers that follow a Log-normal distribution with a given geometric mean and geometric standard deviation
@acook
acook / keypress.rb
Created December 2, 2012 18:42
Read keypresses from user in terminal, including arrow keys using pure Ruby. This has since been folded into a much more robust gem called Remedy. https://rubygems.org/gems/remedy & https://github.com/acook/remedy
require 'io/console'
# Reads keypresses from the user including 2 and 3 escape character sequences.
def read_char
STDIN.echo = false
STDIN.raw!
input = STDIN.getc.chr
if input == "\e" then
input << STDIN.read_nonblock(3) rescue nil
@inlikealion
inlikealion / Dummy Text
Created April 7, 2011 13:53
Dummy text provided by Matthew Smith of Squared Eye
This is dummy copy. It is not meant to be read. It has been placed here solely to demonstrate the look and feel of finished, typeset text. Only for show. He who searches for meaning here will be sorely disappointed. These words are here to provide the reader with a basic impression of how actual text will appear in its final presentation. Think of them merely as actors on a paper stage, in a performance devoid of content yet rich in form. That being the case, there is really no point in your continuing to read them. After all, you have many other things you should be doing. Who's paying you to waste this time, anyway?
This is dummy copy. It's Greek to you. Unless, of course, you're Greek, in which case, it really makes no sense. Why, you can't even read it! It is strictly for mock-ups. You may mock it up as strictly as you wish.
Meaningless mock-up, mock turtle soup spilled on a mock turtle neck. Mach I Convertible copy. To kill a mockingbird, you need only force it to read this copy. This is Meaningless