Skip to content

Instantly share code, notes, and snippets.

function h2b(hexin){
return parseInt(hexin, 10).toString(2);
}
//from http://stackoverflow.com/a/12987042
function d2h(n){return n.toString(16).toUpperCase()}
function conv(hexin){
console.log('0x'+d2h(hexin)+':'+h2b(hexin));
}
/*
@LottieVixen
LottieVixen / Convert Script – README.md
Created October 5, 2018 05:52 — forked from Zehkul/Convert Script – README.md
Script to quickly convert and crop videos from within mpv

#README:

This script for mpv intends to offer the fastest and simplest way to convert parts of a video—while you’re watching it and not really more work intensive than making a screenshot. A short demonstration: https://d.maxfile.ro/omdwzyhkoa.webm

##Installation:

You need:

  • yad (at least 0.26) (AUR)
@LottieVixen
LottieVixen / bootstrap.js
Created July 25, 2018 08:12 — forked from Noitidart/bootstrap.js
Bootstrap addon demo. Shows how to add a sidebar to all browsing windows. More specifically, a sidebar which allows HTML content.
const {interfaces: Ci, utils: Cu} = Components;
Cu.import('resource://gre/modules/Services.jsm');
/*start - windowlistener*/
var windowListener = {
//DO NOT EDIT HERE
onOpenWindow: function (aXULWindow) {
// Wait for the window to finish loading
let aDOMWindow = aXULWindow.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowInternal || Ci.nsIDOMWindow);
aDOMWindow.addEventListener("load", function () {
@LottieVixen
LottieVixen / titleUrlMarkdownClip.js
Created July 23, 2018 10:19 — forked from bradleybossard/titleUrlMarkdownClip.js
Bookmarklet to copy current page title and url in Markdown format to clipboard, like [title](url) - Usual for posting links to resources in README.md files
javascript:(function() {
function copyToClipboard(text) {
if (window.clipboardData && window.clipboardData.setData) {
/*IE specific code path to prevent textarea being shown while dialog is visible.*/
return clipboardData.setData("Text", text);
} else if (document.queryCommandSupported && document.queryCommandSupported("copy")) {
var textarea = document.createElement("textarea");
textarea.textContent = text;
require(["lib/play-manager"], function(a) {
// via http://stackoverflow.com/a/6274381
//+ Jonas Raoni Soares Silva
//@ http://jsfromhell.com/array/shuffle [v1.0]
function shuf(o) { for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x); }
shuf(a.source.models);
var c = a.getCurrentSound(), p = c ? c.isPaused() : false;
a.playNext(); a.playPrev(); // poor man's refresh of current playing song
if (p) a.pause(c); // preserve first-run state
@LottieVixen
LottieVixen / DCPU-16Spec.txt
Created June 4, 2017 20:12 — forked from metaphox/DCPU-16Spec.txt
DCPU-16 Specification
DCPU-16 Specification
Copyright 1985 Mojang
Version 1.7
=== SUMMARY ====================================================================
* 16 bit words
* 0x10000 words of ram
@LottieVixen
LottieVixen / Test-FactorioMod.ps1
Created May 27, 2017 11:19 — forked from dustine/Test-FactorioMod.ps1
Powershell script for factorio dev
[CmdletBinding()]
Param(
[Parameter(Mandatory=$true, Position=0)]
[string]$Path,
[string]$Cache="",
[string]$Libs="D:/Projects/Factorio",
[switch]$Deploy,
[switch]$NoAudio
)
@LottieVixen
LottieVixen / data.lua
Last active July 1, 2017 06:37 — forked from justarandomgeek/data.lua
Lubeless-Express-Belts
require("prototypes.item")