Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| local random = math.random | |
| local function uuid() | |
| local template ='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' | |
| return string.gsub(template, '[xy]', function (c) | |
| local v = (c == 'x') and random(0, 0xf) or random(8, 0xb) | |
| return string.format('%x', v) | |
| end) | |
| end |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| -- public domain | |
| -- author: LPGhatguy | |
| local default_samples = 48000 | |
| local pitch_rate = 2^(1 / 12) | |
| local function round(n) | |
| return math.floor(n + 0.5) | |
| end |
| /** | |
| * K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex") | |
| * | |
| * More language ports, as well as legacy 2014 OpenSimplex, can be found here: | |
| * https://github.com/KdotJPG/OpenSimplex2 | |
| */ | |
| public class OpenSimplex2S { | |
| private static final long PRIME_X = 0x5205402B9270C86FL; |
Note: I wrote this in 2015 when I was raiding with a casual guild in WoW.
done consciously and intentionally: a deliberate attempt to provoke conflict.
fully considered; not impulsive: a deliberate decision.
synonyms: intentional, calculated, conscious, intended, purposeful
| // paste in your console | |
| speechSynthesis.onvoiceschanged = function() { | |
| var msg = new SpeechSynthesisUtterance(); | |
| msg.voice = this.getVoices().filter(v => v.name == 'Cellos')[0]; | |
| msg.text = Object.keys(window).join(' '); | |
| this.speak(msg); | |
| }; |
| local Spring = {} do | |
| Spring.__index = Spring | |
| local pi = math.pi | |
| local exp = math.exp | |
| local sin = math.sin | |
| local cos = math.cos | |
| local sqrt = math.sqrt | |
| function Spring.new(dampingRatio, frequency, position) |
player is better than plr.wasCalled is better than hasBeenCalled. notify is better than doNotification.isFirstRun is better than firstRun.increment is better than plusOne. unzip is better than filesFromZip.onClick is better than click.isFlying instead of isNotFlying. late intead of notOnTime.if not something then ... else ... end.missingValue instead of not hasValue.| use std::path::Path; | |
| /// VFS provides two benefits over using `fs: | |
| /// | |
| /// * consistent snapshots: reading the same file twice is guranteed to return | |
| /// the same result, unless you explicitly advance the revision of VFS | |
| /// * automated file watching: if you read a file or a dir, you will be notified when the | |
| /// file changes. | |
| struct Vfs {} |
| local RunService = game:GetService("RunService") | |
| -- compile an oriented bounding box into a scaled CFrame | |
| local function compileBBox(cframe: CFrame, size: Vector3) | |
| return CFrame.fromMatrix( | |
| cframe.Position, | |
| cframe.XVector/size.X, | |
| cframe.YVector/size.Y, | |
| cframe.ZVector/size.Z | |
| ):Inverse() |