Accepts input as a list of UTF-32 codepoints and returns a Number.
let isNewline: Number -> Boolean =
(x: Number) -> x == 10
let isDigit: Number -> Boolean =
(x: Number) -> (x >= 48) && (x < 58)
This script was adapted to allow you to play audio files through your microphone input. It does so by creating a virtual microphone and piping an audio file to it.
The work was mostly done in this StackOverflow answer, I just adapted it to use ffmpeg and add a trap to cleanup on exit.
Requirements:
java.util.Random, An instance of this class is used to generate a stream of pseudorandom numbers. The class uses a 48-bit seed, which is modified using a linear congruential formula. (See Donald Knuth, The Art of Computer Programming, Volume 2, Section 3.2.1.)
This class has 6 nifty functions:
nextFloat()
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- | |
How to define a variable. | |
Just stick a new node in a property group. | |
--> | |
<PropertyGroup> | |
<!-- This node in a property group will define a variable --> | |
<TestVariable>Test Variable Value</TestVariable> | |
// | |
// Simple example of using net.Socket but here we capture the | |
// right events and attempt to re-establish the connection when | |
// is is closed either because of an error establishing a | |
// connection or when the server closes the connection. | |
// | |
// Requires | |
var net = require('net'); |
# ~/.config/fish/functions/fish_prompt.fish | |
# name: Robbyrussell edited | |
# author: Bruno Ferreira Pinto, edit by Yuri Artemev | |
function fish_prompt | |
if not set -q -g __fish_robbyrussell_art_functions_defined | |
set -g __fish_robbyrussell_art_functions_defined | |
function _git_branch_name | |
echo (git rev-parse --abbrev-ref HEAD ^/dev/null) |
$ curl -L https://github.com/glfw/glfw/releases/download/3.3.2/glfw-3.3.2.zip > glfw-3.3.2.zip | |
$ unzip glfw-3.3.2.zip | |
$ cd glfw-3.3.2/ | |
$ mkdir build | |
$ cd build | |
$ export MACOSX_DEPLOYMENT_TARGET=10.14 | |
$ cmake -D CMAKE_BUILD_TYPE=Release -D GLFW_NATIVE_API=1 -D CMAKE_OSX_ARCHITECTURES="x86_64;arm64" -D BUILD_SHARED_LIBS=ON -D CMAKE_C_COMPILER=clang ../ | |
$ make | |
$ ls -l src/libglfw* |
require "rubygems" | |
require "twitter" | |
require "json" | |
# things you must configure | |
TWITTER_USER = "your_username" | |
MAX_AGE_IN_DAYS = 1 # anything older than this is deleted | |
# get these from dev.twitter.com | |
CONSUMER_KEY = "your_consumer_key" |